Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Eliminating last comma

by dorward (Curate)
on Jun 21, 2006 at 13:13 UTC ( [id://556651]=note: print w/replies, xml ) Need Help??


in reply to Eliminating last comma

You don't need to match the entire string, just the bit you want to modify.

my $myNames = "Jones, Smith, Baker, Johnson,"; $myNames =~ s/,$//;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-19 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found