Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Unpack Many Fields

by shoness (Friar)
on Feb 16, 2010 at 02:23 UTC ( [id://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 (Patriarch) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://823383]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-04-19 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found