in reply to perl one liner
my ($day,$month,$year) = split("/",$date); [download]
my ($day,$month,$year) = split("/",$date);
I think that code is answering a different question, but you could have answered the OP's one by adding a join.
my $var1 = q{10/02/2009}; my $var2 = join q{}, split m{/}, $var1; [download]
Another way would be to use tr, for details look in Quote Like Operators;
my $var1 = q{10/02/2009}; ( my $var2 = $var1 ) =~ tr{/}{}d; [download]
I hope this is of interest.
Cheers,
JohnGG
Update: Added my declarations to second code snippet.
www.com | www.net | www.org
No recent polls found