Nice, however it is not the same as the code of the OP. Consider the following code:
Rata (knowing that this special case is probably excluded by an unwritten part of the spec)my $description = "windows and linux and solaris"; $os = $1 if ( $description =~ /(windows)/i ); $os = $1 if ( $description =~ /(linux)/i ); $os = $1 if ( $description =~ /(solaris)/i ); print $os; $os = $1 if $description =~ /(windows|linux|solaris)/i; print " $os\n";
In reply to Re^2: is this horrible?
by Ratazong
in thread is this horrible?
by fionbarr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |