nisha has asked for the wisdom of the Perl Monks concerning the following question:
Please help$filepath="c:\\reports"; i also have $string="c:\\reports"; i want to do a pattern match here like if ( $string=~m/$filepath/) { print "Found"; } But here within / / is it possible to give a variable name?? How do we + specify a variable name inside / / in pattern matching.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular Expressions
by l.frankline (Hermit) on Nov 08, 2005 at 08:40 UTC | |
|
Re: Regular Expressions
by murugu (Curate) on Nov 08, 2005 at 07:50 UTC | |
|
Re: Regular Expressions
by blazar (Canon) on Nov 08, 2005 at 10:50 UTC | |
|
Re: Regular Expressions
by tbone1 (Monsignor) on Nov 08, 2005 at 12:43 UTC | |
by blazar (Canon) on Nov 09, 2005 at 14:51 UTC | |
|
Re: Regular Expressions
by jesuashok (Curate) on Nov 08, 2005 at 07:31 UTC | |
|