Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2015-11-26 13:17 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (699 votes), past polls