Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 rifling through the Monastery: (7)
As of 2014-09-23 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (241 votes), past polls