Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: split line

by moritz (Cardinal)
on Jul 28, 2008 at 21:20 UTC ( #700662=note: print w/replies, xml ) Need Help??


in reply to split line

If you pass a single blank space to split, it behaves magically and removes all leading spaces:
use strict; use warnings; use Data::Dumper; my $line = " 0 10 9 4 1 0 0 0 2 2 1 1 0"; my @config = split " ", $line; print Dumper \@config;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2022-12-04 22:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?