davyzhu
Advanced Member level 1
split lines into array perl
Hi all,
I am new to perl.
I use
#------------------
while(<INFILE>) {
$line = $_;
}
#------------------
to get one line from the file,
The line may like: sum 11 32
How to split lines into array like @myarray = {"sum","11","32"}; which knowing how many space between the words?
Any suggestions will be appreciated!
Davy
Hi all,
I am new to perl.
I use
#------------------
while(<INFILE>) {
$line = $_;
}
#------------------
to get one line from the file,
The line may like: sum 11 32
How to split lines into array like @myarray = {"sum","11","32"}; which knowing how many space between the words?
Any suggestions will be appreciated!
Davy