(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!
In reply to Re: Controlling Running Perl Scripts
by Moron
in thread Controlling Running Perl Scripts
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |