Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Substitution Trickery

by awkmonk (Monk)
on Mar 24, 2003 at 10:13 UTC ( #245400=note: print w/ replies, xml ) Need Help??


in reply to Substitution Trickery

More as a note of robustness, don't assume that the field is terminated by a slash.

$served =~ s/^(.+) *$/$1/;

just to get rid of any trailing spaces (they always seem to creep in just to annoy me).

First rule of programming: Never code for an error you don't know how to handle.


Comment on Re: Substitution Trickery
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (14)
As of 2015-05-06 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (140 votes), past polls