SPUG: File::Find dumping core
Daniel Pommert
dpommert at bestnet.com
Fri May 11 19:26:55 CDT 2001
I believe that you should change
next if ...
to
return if ...
-- Daniel Pommert
-----Original Message-----
From: Chris Wilkes
To: spug-list at pm.org
Sent: 5/11/01 5:06 PM
Subject: SPUG: File::Find dumping core
. . .
It worked w/o the .snapshot ignoring line. When I added that in it does
a
seg fault.
. . .
Chris
#!/usr/bin/perl
use File::Find;
use strict;
my @files;
find (\&wanted, "./");
foreach (@files) {
print "'$_'\n";
}
sub wanted {
next if ($File::Find::name =~ /\.snapshot/);
^^^^
-f && /\.cgi$/ && push @files, $File::Find::name;
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your
Email-address
For daily traffic, use spug-list for LIST ; for weekly,
spug-list-digest
Seattle Perl Users Group (SPUG) Home Page:
http://www.halcyon.com/spug/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
More information about the spug-list
mailing list