Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

basicdez's scratchpad

by basicdez (Pilgrim)
on Jun 02, 2004 at 07:42 UTC ( #359249=scratchpad: print w/replies, xml ) Need Help??

%goodfiles = ( "MODEL\.CON" => "1", "ZMD\.IN" => "1", "SCP\.CON" => "1", "MDLUPDT.DAT" => "1", "MKMDL.ERR" => "1", ); opendir (DIR, "."); @files = readdir (DIR); foreach $file (@files) { print $file; next if ($file =~ /^\./); next if -d "$file"; $file =~ s/\s*$//; $file = "\U$file"; next if ($goodfiles{$file}); print $file; $garbage{$file}++; } closedir (DIR);
Log In?

What's my password?
Create A New User
[Eily]: oh, boolean context uses the "" overload if no bool overload has been defined
[Eily]: (I wondered if overloading bool was actually necessary)
[Corion]: Yeah, you need bool to get a true value, and the rest to return the other value ;)
[choroba]: perl -wE '{package o; use Tie::Scalar; use parent -norequire => "Tie::StdScalar" ;sub FETCH { "x" x int rand 2}} tie my $x, "o" ; say $x for 1 .. 10'
[choroba]: for complete ness

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-07-27 13:52 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (414 votes). Check out past polls.