The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Why is my stupid perl not working? by i_am_pi2002-07-22 16:16:08
  suggestion by nimdokk 2002-07-22 17:11:29
not sure if it will help everything but try:

chomp ($_=<STDIN>);

instead of simply

$_ = <STDIN>;

this will chop the newline off that is tagged onto the end of the line when you hit return. now are you prompting the user to input some text (or hex) and hitting enter? if so, you want to chomp the newline again. you may also want to chomp the end of the line, just to make sure you are stripping the newlines out. like i said, may not solve everything, but could help. haven't played around with ascii-hex conversion with perl.

[ Reply ]

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)