I sat in a Perl Script Security talk, noting that /^[a-z]+$/ on the slides would erroneously match foo\n, and that you can't use the open FOO, "< $bar\0" trick unless you've also preprocessed $bar with an initial ./ if it needs it. Ugh. People need to read perlsec, please.
Then it was the arrest that never happened. Bruce Perens talked about freedoms erroding, and what we could do.
Finally, during the town meeting, we were all chatting on IRC together. When Rael at the front "couch" also got online, I started sending comments to make him chuckle on stage.
It was cool that someone wanted to institutionalize the Stonehenge party. How can I be a rebel when I've been so readily accepted into the fold? Oh well.
It's over. Yeay. Another year to plan and implement the next conference.
Is using [:lower:] the appropriate approach? Just curious.
Re:POSIX character class?
gav on 2002-07-27T01:54:55
The correct thing is to use \z:I don't quite like the \a or \z modifiers. They seem a bit funky to me.$_ = "blah\n";
print "dollar\n" if/^[a-z]+$/;
print "z\n" if/^[a-z]+\z/;
__END__
dollarI tend to solve this problem by getting rid of leading and trailing whitespace with something like:
This also means the user doesn't get tripped up by an extra space at the end of their username etc.my %params = map { $_ => trim($cgi->param($_)) } qw(var_a var_b var_c);
sub trim {
my $str = shift;
if ($str) {
$str =~ s/^\s+//;
$str =~ s/\s+$//;
}
$str;
}Re:POSIX character class?
TorgoX on 2002-07-27T02:00:33
\a is alarm. You mean \A. Yet another problem with the whole mess!
Re:s/Stonehenge/OSCON LAN Party/
merlyn on 2002-07-29T02:28:24
I said:That's not a dig at the party that actually happened. I was merely quoting what I heard in the room. I know it was our party.It was cool that someone wanted to institutionalize the Stonehenge party.
The proper thing to do is of course to use the three argument open(), which was new in 5.6. No parsing of the file name there. sysopen() would work too, but is much clumsier.you can't use the open FOO, "< $bar\0" trick unless you've also preprocessed $bar with an initial./ if it needs it. Ugh.