Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: splitting lines a number of times

by Nkuvu (Priest)
on Apr 01, 2009 at 16:06 UTC ( #754754=note: print w/replies, xml ) Need Help??


in reply to splitting lines a number of times

YAWTDI

$line =~ s/[(),;]//g; my @split1 = split " ", $line;

And yes, once you have these split up, they can be used in numeric calculations.

Just a quick note, when you're referring to a single element of an array, use $split1[0] rather than @split1[0]. See "perldoc -q @" and look at the answer for "What is the difference between $array[1] and @array[1]?"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://754754]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2016-10-01 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (9 votes). Check out past polls.