fionbarr has asked for the wisdom of the Perl Monks concerning the following question:
I know it is inefficient but I'm not sure it's worth 'if/elseif' block. Comments?$os = $1 if ( $description =~ /(windows)/i ); $os = $1 if ( $description =~ /(linux)/i ); $os = $1 if ( $description =~ /(solaris)/i );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: is this horrible?
by hippo (Archbishop) on Feb 16, 2015 at 16:23 UTC | |
by ikegami (Patriarch) on Feb 18, 2015 at 21:34 UTC | |
by fionbarr (Friar) on Feb 16, 2015 at 16:25 UTC | |
|
Re: is this horrible?
by Perlbotics (Archbishop) on Feb 16, 2015 at 16:32 UTC | |
|
Re: is this horrible?
by choroba (Cardinal) on Feb 16, 2015 at 16:25 UTC | |
by Ratazong (Monsignor) on Feb 16, 2015 at 16:35 UTC |