Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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]?"


Comment on Re: splitting lines a number of times
Select or Download Code

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 meditating upon the Monastery: (12)
As of 2014-08-29 13:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (280 votes), past polls