On Tue, 2006-18-04 at 18:20 -0700, Tom Phoenix wrote:
> You don't have to backslash the bang, because it's not a metacharacter.
No, but it doesn't hurt either. If you look at the quotemeta operation
(see `perldoc -f quotemeta`) its output would escape the bang. The
quotemeta operator is the same as using \Q (ending with \E) inside a
match.
#!/usr/bin/perl
use strict;
use warnings;
my $s = '';
for ( 0x20 .. 0x7e ){
$s .= chr( $_ );
}
print "$s\n";
my $q = quotemeta( $s );
print "$q\n";
--
__END__
Just my 0.00000002 million dollars worth,
--- Shawn
"For the things we have to learn before we can do them, we learn by doing them."
Aristotle
* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>