Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2015-07-06 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (74 votes), past polls