in reply to Re^3: Using Regexp Patterns as Variables
in thread Using Regexp Patterns as Variables
For example:
Prints out this:#!/usr/bin/perl use strict; use warnings; $ENV{REQUEST_URI} = "/Products/bt-;system('ls -l');.aspx"; my $in = '/Products/bt-(.*?).aspx'; my $out = '/s/Products/$1'; $ENV{REQUEST_URI} =~ s#$in#eval qq{"$out"}#ie; print "$ENV{REQUEST_URI}\n";
But, the eval isn't actually executing that command. Or, did I not do this test correctly?/Products/bt-;system('ls -l');.aspx
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Using Regexp Patterns as Variables
by kyle (Abbot) on Mar 18, 2009 at 18:09 UTC | |
by ikegami (Patriarch) on Mar 18, 2009 at 19:45 UTC | |
by Rodster001 (Pilgrim) on Mar 18, 2009 at 20:28 UTC | |
by kyle (Abbot) on Mar 18, 2009 at 20:03 UTC | |
by ikegami (Patriarch) on Mar 18, 2009 at 21:13 UTC |