thirtySeven has asked for the wisdom of the Perl Monks concerning the following question:
I am constantly doing this so I want to know other ways to do the same thing.$foo = $1 if $foo =~ /(hello)/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Looking for alternative syntax for assigning variables based on regex matches
by haukex (Archbishop) on Mar 02, 2021 at 05:24 UTC | |
|
Re: Looking for alternative syntax for assigning variables based on regex matches
by rsFalse (Chaplain) on Mar 02, 2021 at 10:28 UTC | |
|
Re: Looking for alternative syntax for assigning variables based on regex matches
by Marshall (Canon) on Mar 02, 2021 at 22:14 UTC | |
|
Re: Looking for alternative syntax for assigning variables based on regex matches
by Anonymous Monk on Mar 02, 2021 at 13:58 UTC |