Nalina has asked for the wisdom of the Perl Monks concerning the following question:
If $dir = "/exp/01jehandel/userinput/runwhennewfile"; then $thisj will have runwhennewfile. Please tell me how is the matching done? Also what difference does putting brackets '()' for $thisj in its assignment statement makes? what is '#' doing here? It will be helpful if some good links for such RE's is provided Thanks & Regards Nalina($thisj) = $dir =~ m#/([^/]+)$#;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Regular Exp
by ysth (Canon) on Dec 28, 2006 at 09:27 UTC | |
|
Re: Perl Regular Exp
by ferreira (Chaplain) on Dec 28, 2006 at 09:37 UTC | |
|
Re: Perl Regular Exp
by virtualsue (Vicar) on Dec 28, 2006 at 10:48 UTC | |
|
Re: Perl Regular Exp
by johngg (Canon) on Dec 28, 2006 at 11:46 UTC | |
|
Re: Perl Regular Exp
by ambrus (Abbot) on Dec 28, 2006 at 11:16 UTC | |
|
Re: Perl Regular Exp
by Anonymous Monk on Dec 28, 2006 at 12:13 UTC | |
|
Re: Perl Regular Exp
by Anonymous Monk on Dec 28, 2006 at 12:14 UTC |