in reply to Controlling Running Perl Scripts
(updated with thx to shigetsu)our @sequence = ( "path1", "path2", # ... ); sub nextpath { for ( my $i=0; $i<=$#sequence; $i++ ) { ( $PATH_INFO eq $sequence[$i] ) or next; ( $i < $#sequence ) ? return( $sequence[$i+1]); : return( $sequence[0]); } undef(); }
^M Free your mind!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Controlling Running Perl Scripts
by shigetsu (Hermit) on Apr 25, 2007 at 16:12 UTC | |
by Anonymous Monk on Apr 25, 2007 at 17:47 UTC | |
by suaveant (Parson) on Apr 25, 2007 at 18:29 UTC |