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

Perl Question by nimdokk 2001-11-07 15:54:29
ok - i'm working on a perl script (converting a ksh program to perl) i'm having a problem with a while loop. I'm giving the user a choice to either continue searching for other files - or to exit the program. Everything runs fine up until the user is given the choice to loop back through the program. At that point - no matter what I try - what happens is the program exits - no matter what the user puts in.

here is the relevant section of code:

print "Enter the IQ name to search for?\n";
chomp ($FILE = <STDIN>);

search_main_iq ();

print "Do you want to look for another file? [Y/N] ";
chomp ($CHOICE = <STDIN>);

while ($CHOICE eq [yY]) {
  search_main_iq ();
  print "Do you want to look for another file? [Y/N] ";
  chomp ($CHOICE = <STDIN>);
}
does anyone have any thoughts?

[ Reply ]
  Re: Perl Question by foetusinc2001-11-07 16:37:03
    thanks by nimdokk2001-11-07 16:45:51
      context by foetusinc2001-11-07 16:54:46
        cool by nimdokk2001-11-07 17:09:35
    Oh yeah by foetusinc2001-11-07 16:49:25
      thanks again by nimdokk2001-11-07 16:52:14
  My own perl question... by Arienadean2001-11-07 21:10:08
    this works on RH systems and should work on others by nawft2001-11-07 21:21:21
      thanks :) (n/t) by Arienadean2001-11-07 22:26:00
    CPAN module install by kickstart2006-11-19 12:55:59
      thanks :) by Arienadean2001-11-07 23:26:01

 

[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.)