Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: (Ovid -Golf) Re(3): How do you chomp your chomps?

by chromatic (Archbishop)
on Jan 09, 2001 at 10:15 UTC ( #50631=note: print w/ replies, xml ) Need Help??


in reply to (Ovid -Golf) Re(3): How do you chomp your chomps?
in thread How do you chomp your chomps?

All fine and good while $/ is \n. Dunno about you :), but I've been known to change it now and then:

sub my_chomp { substr shift, 0, ((length) = length($/)) if $_[0] =~ /$\$/};

Untested, but I would like to point out that the regex is pretty.


Comment on Re: (Ovid -Golf) Re(3): How do you chomp your chomps?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2014-08-30 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls