Current location: Hot Scripts Forums » Programming Languages » Perl » what's wrong in this statment?


what's wrong in this statment?

Reply
  #1 (permalink)  
Old 01-29-04, 12:59 PM
freak freak is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Question what's wrong in this statment?

$t=12000;
$x=10000;
$stopper='end';
$line[$i] = readline(*STDIN);
$reader = $line[$i];
if(($reader!=$stopper)&&($t>=$x)){
print $stopper;
}
else{
print 'blabla';
}

#it always prints 'blabla', why?
Reply With Quote
  #2 (permalink)  
Old 02-03-04, 07:45 AM
rocknroller rocknroller is offline
New Member
 
Join Date: Feb 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Try printing the conditions instead of blabla. Work on your troubleshooting skills.

else{
print "$reader != $stopper && $t >= $x";
}

Might tell you something.
__________________
Get your Stats here
http://www.perlscriptsjavascripts.com/perl/allcount/index.html
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anybody know whats wrong NerdRUS PHP 3 01-01-04 11:11 PM
What have I done wrong now??? DAL Perl 4 11-24-03 06:26 PM
what am i doing wrong?? metamorphosis The Lounge 1 08-20-03 05:37 PM
help me determine whats wrong Cmrdrv The Lounge 6 08-12-03 11:57 AM
something wrong with this code superman PHP 3 07-06-03 10:55 PM


All times are GMT -5. The time now is 04:53 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.