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

Re: My split command isnt working - please advise

by wfsp (Abbot)
on May 23, 2011 at 14:32 UTC ( #906307=note: print w/replies, xml ) Need Help??


in reply to My split command isnt working - please advise

Given the data you've shown I'm sure not you need the first split (check for what split uses as a default).
#!/usr/bin/perl #use v5.12.2; use strict; use warnings; while(my $line = <DATA>){ chomp $line; my @nums = split(/\./, $line); print "@nums\n"; } __DATA__ 1.2.56.3 3.55.7.3

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://906307]
help
Chatterbox?
[Discipulus]: ah ok, sounds reasonable; with no fear: Perl all life long
[ambrus]: Mind you, LaTeX is currently still useful for writing math paper or snippet content without styling in such a way that the
[ambrus]: formatting conventions of a journal or website can be quickly applied to it, and MS Office and LibreOffice has not quite solved this (although it's better for this than it used to be),
[ambrus]: which is sort of a drawback compared to the ages of typewritten manuscripts representing content only to which the typesetter applies formatting, but that process required much more manual labor.
[ambrus]: If you want to typeset a manuscript, you can still do much less work then in the manual typesetting ages and get good formatting.
[ambrus]: All with only cheap modern computers and software.
[ambrus]: Something you can have at home and your corner print shop, without a whole printing press's worth of equipment.

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2017-09-26 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (293 votes). Check out past polls.

    Notices?