Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: rearranging a string.new

by Corion (Patriarch)
on Nov 21, 2005 at 19:20 UTC ( [id://510529]=note: print w/replies, xml ) Need Help??


in reply to rearranging a string.new

It's not "leaving the 2005 in front". Check your code, for example by running the below code:

my $string = '20050516'; my $newstring = substr($string,0,8). "!" . substr($string,0,4) . "!" . + substr($string,8,0); print $newstring;

If you look at the output of this snippet, you will see where your errors lie.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2025-07-19 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.