09-17-2007
Perl does the "array declaration" for you.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
So my knowledge of bash scripting is not that great and I have been trying to solve this problem on my own for awhile to no avail.
Here's the error I get when running it with an OS that uses bash 3.2.x:
testagain.sh: line 10: *-1: syntax error: operand expected (error token is... (2 Replies)
Discussion started by: forkandspoon
2 Replies
2. Shell Programming and Scripting
I am trying to take first 3 columns in a file which matches the word "abc", but i am getting the below error,
<error>
Global symbol "@F" requires explicit package name at ./new.pl
</error>
whereas when i give the below,grep abc /home/test/file.txt|perl -lane 'print \"$F $F $F\" in unix prompt... (4 Replies)
Discussion started by: anspks
4 Replies
3. Shell Programming and Scripting
so in unix this command works works and shows me a list of directories
find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt
but when i try running a perl script to run this command
my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies
4. Shell Programming and Scripting
Hi everyone I'm new here so and I'm just starting to learn a bit of Solaris and I'm working on repairing 10 year old scripts for our system here at work.
When I execute the commands at my prompt everything go's through smooth. I'm using gedit to edit my code because I'm still getting used to the... (4 Replies)
Discussion started by: 82280zx
4 Replies
5. Shell Programming and Scripting
Hi, the following command works in the terminal no problem.
samtools view -h rawlib.bam | perl -ne '{ @line = split( /\s+/ ); $match = 0; while( $line =~ /(\d+)M/g ) { $match = $match + $1 } if( $match >= 80 || $_ =~ /^\@/ ) { print $_ } }' | java -Xmx12G -jar... (8 Replies)
Discussion started by: jdilts
8 Replies
6. Shell Programming and Scripting
Helo, i have written a bash script for running my calculations. anyway, according to shellcheck the error is somewhere in the while loop or in the if condition.
so the idea of this script is:
submit a job with a name.
while it is in the queue it has a job ID number.
after the job is done i... (2 Replies)
Discussion started by: carborane
2 Replies
7. Shell Programming and Scripting
In the below perl executes if one file is processed perfect. However, when multiple files are processed in batch which is preferred I get the below error that I can not seem to fix it as the '' necessary for the command to execute, but seem to only work for one -arg option. Thank you :).
... (2 Replies)
Discussion started by: cmccabe
2 Replies
8. Shell Programming and Scripting
I have a file with two line, one is header, the other actual value:
TYPCD|ETID2|ETID|LEG ID|PTYP|PTYP SUB|TRD STATUS|CXL REASON|CACT|CACTNM|ENCD|ENC
D NM|TRDR|ASDT|TRDT|MTDT|STDT|LS|SECID|SECID TYP|SECNM|PAR|STCC|MARKET PRICE|DIS
MARKET PRICE|MARKET PRICE CURRENCY|SRC OF SETTLEMENT... (2 Replies)
Discussion started by: digioleg54
2 Replies
9. Shell Programming and Scripting
Hello all,
I am facing a weird issue while executing a code below -
#!/bin/bash
cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset
sh UKBA_publish.sh UKBA 28082015 3
if
then
echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
Discussion started by: ektubbe
2 Replies
10. Shell Programming and Scripting
Hi All,
I'm new to the forum and to bash scripting. I did some stuff with VB.net, Batch, and VBScripting in the past, but because I shifted over to Linux, I am learning to script in Bash at this moment. So bear with me if I seem to script like a newbie, that's just because I am ;-)
OK, I... (9 Replies)
Discussion started by: cornelvis
9 Replies
LEARN ABOUT MOJAVE
ppi::statement::sub
PPI::Statement::Sub(3) User Contributed Perl Documentation PPI::Statement::Sub(3)
NAME
PPI::Statement::Sub - Subroutine declaration
INHERITANCE
PPI::Statement::Sub
isa PPI::Statement
isa PPI::Node
isa PPI::Element
DESCRIPTION
Except for the special BEGIN, CHECK, UNITCHECK, INIT, and END subroutines (which are part of PPI::Statement::Scheduled) all subroutine
declarations are lexed as a PPI::Statement::Sub object.
Primarily, this means all of the various "sub foo {}" statements, but also forward declarations such as "sub foo;" or "sub foo($);". It
does not include anonymous subroutines, as these are merely part of a normal statement.
METHODS
"PPI::Statement::Sub" has a number of methods in addition to the standard PPI::Statement, PPI::Node and PPI::Element methods.
name
The "name" method returns the name of the subroutine being declared.
In some rare cases such as a naked "sub" at the end of the file, this may return false.
prototype
If it has one, the "prototype" method returns the subroutine's prototype. It is returned in the same format as "prototype" in
PPI::Token::Prototype, cleaned and removed from its brackets.
Returns false if the subroutine does not define a prototype
block
With its name and implementation shared with PPI::Statement::Scheduled, the "block" method finds and returns the actual Structure object of
the code block for this subroutine.
Returns false if this is a forward declaration, or otherwise does not have a code block.
forward
The "forward" method returns true if the subroutine declaration is a forward declaration.
That is, it returns false if the subroutine has a code block, or true if it does not.
reserved
The "reserved" method provides a convenience method for checking to see if this is a special reserved subroutine. It does not check against
any particular list of reserved sub names, but just returns true if the name is all uppercase, as defined in perlsub.
Note that in the case of BEGIN, CHECK, UNITCHECK, INIT and END, these will be defined as PPI::Statement::Scheduled objects, not
subroutines.
Returns true if it is a special reserved subroutine, or false if not.
TO DO
- Write unit tests for this package
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.18.2 2011-02-25 PPI::Statement::Sub(3)