![]() |
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| issue with if loop in perl | amitrajvarma | Shell Programming and Scripting | 4 | 01-09-2008 12:02 AM |
| loop throw perl regexp selection | umen | Shell Programming and Scripting | 6 | 08-28-2006 11:35 AM |
| how to get the pos() of 2 str matches in one loop in perl | umen | Shell Programming and Scripting | 1 | 07-26-2006 10:30 AM |
| Perl - Iterating a hash through a foreach loop - unexpected results | quantumechanix | Shell Programming and Scripting | 5 | 12-15-2003 07:08 PM |
| for loop using the value '01' in PERL | dangral | Shell Programming and Scripting | 9 | 10-01-2003 04:34 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
help with perl while loop
Can anyone tell me why this program won't kick out when the time gets beyond time in the loop?
sub showtime { local($format,$military)=@_; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time); if ((! $military) && ($hour > 12)) {$hour-=12;} $min=sprintf("%02d",$min); $sec=sprintf("%02d",$sec); $format =~ s/SS/$sec/g; $format =~ s/HH/$hour/g; $format =~ s/MM/$min/g; return $format; } printf &showtime("The Time is Now HHMM\n",1); while ($showtime le 2345) { while ($x==0 ) { if (-e $legrun) { $x=0; sleep 10; } else { $x=1; } } $x=0; |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|