Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Answer: How can I delete a part of a string?

by ariels (Curate)
on Feb 15, 2001 at 15:31 UTC ( #58600=categorized answer: print w/replies, xml ) Need Help??

Q&A > strings > How can I delete a part of a string? - Answer contributed by ariels

Expanding on japhy:
$x = 'Just another COBOL hacker,'; substr($x,13,5) = 'Perl';
Saying substr($x,13,5,'Perl') would work as well, but I find it less clear.

Log In?

What's my password?
Create A New User
[Lady_Aleena]: Renaming things like get_THAC0 to just THAC0 was easy. These are harder.
[james28909]: consolidate the three subs into one
[Lady_Aleena]: Um, what?
[james28909]: check is is data or hash or array and do tasks then return needed data
[Lady_Aleena]: james28909, you might want to look at the other two on my scratchpad.
[james28909]: after you send to a sub, you can check if it is array or ref ect with ref

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2017-05-24 04:50 GMT
Find Nodes?
    Voting Booth?