Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Unpack Many Fields

by shoness (Friar)
on Feb 16, 2010 at 02:23 UTC ( #823383=note: print w/replies, xml ) Need Help??


in reply to Re^2: Unpack Many Fields
in thread Unpack Many Fields

I think it has to be something like
$fmt =~ s/(?:#.*)|\n|\s//g;
Thanks to both of you!
My code is already looking much better.
Cheers!

Replies are listed 'Best First'.
Re^4: Unpack Many Fields
by ikegami (Pope) on Feb 16, 2010 at 02:47 UTC

    Not at all. For starters,

    s/(?:#.*)|\n|\s//g

    is the same as

    s/#.*|\s//g

    Secondly, spaces are allowed in the pattern, so your change is unwarranted.

    Finally, comments are allowed in the pattern, so you don't need the substitution at all.

      Spaces AND NEWLINES are accepted in the pattern! Cool.
      That's why you're the boss! ++

      Cheers!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (1)
As of 2020-10-25 17:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (249 votes). Check out past polls.

    Notices?