in reply to Re^2: Variable use lib with taint (FindBin problem)
in thread Variable use lib with taint (FindBin problem)

You can untaint $Bin in a BEGIN block.

#!/usr/bin/perl -T use warnings; use strict; use FindBin qw/$Bin/; BEGIN { if ($Bin =~ m!([\w\./]+)!) { $Bin = $1; } else { die "Bad directory $Bin\n"; } } use lib "$Bin/../lib"; use Data::Dumper; print "Hello!!\n";
--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^4: Variable use lib with taint (FindBin problem)
by Anonymous Monk on Aug 18, 2004 at 12:47 UTC
    Thank you. That solved the problem.