Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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


$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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://754754]
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
Find Nodes?
    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