It's generally necessary to check whether a regex succeeded before using any of the regex special variables.#!/usr/local/bin/perl -w use strict; $_ = 'perlmonks.org'; for my $re (qw/monks minks/) { /(perl)/; print "$1\n"; { # new block for regex /($re)/; print "$1\n"; } } __END__ perl monks perl perl
In reply to Re: Re: Re: Untainting 'bad' filenames
by chipmunk
in thread Untainting 'bad' filenames
by doran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |