On 5/25/05, Manav Mathur wrote:
> 
> our $rupee = <STDIN>;
> chomp($rupee) ;

Vineet,
This is a quote from "perldoc perlop":
"In scalar context, evaluating a filehandle in angle brackets yields
the next line from that file (the newline, if any, included),"
Manav's solution involves removing the newline using chomp. You can
also write this in one line if you want (read "perldoc -f chomp" for
details):
chomp(our $rupee = <STDIN>);

Finally and unrelated, unless you have a very good reason to make
$rupee and $rupee_c1 global, I would change the declaration to "my"
instead of "our". Don't use globals without a good reason, it's a bad
habit :-)

Cheers,
-- 
Offer Kaye

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to