Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 imbibing at the Monastery: (2)
As of 2024-04-26 01:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found