Re: data comprised of regexs (while loop weirdness)
From: gnari (gnari_at_simnet.is)
Date: 08/13/04
- Next message: Anno Siegel: "Re: Perl - Parse UNC Path in a string variable"
- Previous message: Abhinav: "Re: Match inner quotes ?"
- In reply to: Scott W Gifford: "Re: data comprised of regexs (while loop weirdness)"
- Next in thread: Tad McClellan: "Re: data comprised of regexs (while loop weirdness)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 13 Aug 2004 09:46:44 -0000
"Scott W Gifford" <gifford@umich.edu> wrote in message
news:qszy8kkw0tp.fsf@mspacman.gpcc.itd.umich.edu...
> #!/usr/bin/perl -w
>
> use strict;
>
> my $request = shift @ARGV;
>
> my @data = <DATA>;
> for(@data)
> {
> chomp;
> print "'$request' ?~ /$_/: ";
> if ($request =~ /$_/) {print 'yes';}
> print "\n";
> }
> __DATA__
> test1
> test2
> test3
> ...
> I assume that the contents of the file you're reading from is under
> your control, BTW; regular expressions can contain code, so if
> somebody can write to that file they'll have the ability to cause your
> script to execute code of their choice.
please provide an example.
there is no eval() or /e in the code showed.
(?{}) is not interpolated.
what are you talking about?
gnari
- Next message: Anno Siegel: "Re: Perl - Parse UNC Path in a string variable"
- Previous message: Abhinav: "Re: Match inner quotes ?"
- In reply to: Scott W Gifford: "Re: data comprised of regexs (while loop weirdness)"
- Next in thread: Tad McClellan: "Re: data comprised of regexs (while loop weirdness)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|