Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Using substr to remove characters

by bmann (Priest)
on May 06, 2005 at 18:33 UTC ( [id://454762]=note: print w/replies, xml ) Need Help??


in reply to Using substr to remove characters

It's a shell quoting issue, not a substr issue. Change the single quotes around the empty string to double quotes, it'll work fine.
$ perl -e 'my $str = "This_is_a_song_.mp3"; substr($str, 14, 1, ""); p +rint $str."\n";' This_is_a_song.mp3

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-04-25 00:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found