5

shell programming and scripting

view full story
linux-howto

http://www.unix.com – hi, i am trying this while loop and i only want that it should only read food as pizza....no other entry should be taken here. #!/usr/bin/perl -w $food = " "; while ( $food ne 'pizza' ) { print 'enter what you had last night: '; chomp ($food = <STDIN>); #print $food ; } print "Mmm....it was yummy \n"; this is what the result i get after running this particular script, that the loop does not end and tht i have to terminate the session. enter what you had last night: mango enter what you had last night: pizza enter what you had last night: tomato enter what y (HowTos)