I think the –p is the one causing the problem

 

Tried

 

echo 4.56 | perl -e 'my $var1 = <STDIN> * 100; print $var1;'

 

and the result is 456

 

 

 

bash-2.01$ echo 4.56 | perl -p -e 'my $var1 = <STDIN>; $var2 = $var1 * 100;  print $var2;'
04.56

 

 

I only remove the –p option


--
This message has been scanned for viruses and dangerous content by host-center.net and is believed to be clean.
_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to