Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: splitting lines a number of times

by Nkuvu (Priest)
on Apr 01, 2009 at 16:06 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://754754]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found