reverse not working
Hi All,
The piece of code below doesnot print the string backwards
while(<STDIN>)
{
print "Backwards is ",reverse($_),"\n";
}
unlike this one which works
while(<STDIN>)
{
my $reverse = reverse $_;
print "Backwards is $reverse \n";
}
Why is that ,please advice?
|