Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Code that feels good

by Anonymous Monk
on Aug 25, 2001 at 01:46 UTC ( [id://107731]=note: print w/replies, xml ) Need Help??


in reply to Code that feels good

Having just convinced a co-worker that:
print join('^',split(/\s+/,$_)),"\n";
was much nicer than
my ($field1,$field2,$field3) = split(/\s+/,$_);
print "$field1^$field2^$field3\n";
I can say that code can feel good. ----

Replies are listed 'Best First'.
(MeowChow) Re2: Code that feels good
by MeowChow (Vicar) on Aug 25, 2001 at 06:48 UTC
    print join('^', /\S+/g), $/

    ... feels even better :-)

       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-19 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found