Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can i confirm the following:
1. This code is just looking for any number of backslashes
2. This code is matching for a backslash but what does the $ meanif ($var ~= m/\*/)
3. This code is replacing . gz at the end of a string. with nothingunless($path ~= m/\/$/)
Many thanks$output ~= s/\.gz$//;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Basic regular expressions
by mjscott2702 (Pilgrim) on Oct 21, 2010 at 12:53 UTC | |
|
Re: Basic regular expressions
by Corion (Patriarch) on Oct 21, 2010 at 12:55 UTC | |
|
Re: Basic regular expressions
by toolic (Bishop) on Oct 21, 2010 at 13:18 UTC | |
|
Re: Basic regular expressions
by muba (Priest) on Oct 21, 2010 at 12:55 UTC | |
|
Re: Basic regular expressions
by Ratazong (Monsignor) on Oct 21, 2010 at 13:54 UTC | |
|
Re: Basic regular expressions
by raybies (Chaplain) on Oct 21, 2010 at 14:28 UTC |