Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Pattern match and splitting of that

by toolic (Bishop)
on Jun 22, 2017 at 13:39 UTC ( #1193295=note: print w/replies, xml ) Need Help??


in reply to Pattern match and splitting of that

split is an appropriate tool for this job:
use strict; use warnings; use Data::Dumper; my $string = "RABBIT 45 -126.06686"; my @parts = split /\s+/, $string; print Dumper(\@parts); __END__ $VAR1 = [ 'RABBIT', '45', '-126.06686' ];

Also, the code you posted has a compile error.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2022-01-22 17:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?