Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: How to delete empty files

by padawan_linuxero (Scribe)
on Jan 11, 2008 at 00:37 UTC ( [id://661764]=note: print w/replies, xml ) Need Help??


in reply to Re: How to delete empty files
in thread How to delete empty files

HI
your example gave me an error message
Use of uninitialized value in string eq at C:/Perl/site/lib/File/Find/ +Rule.pm line 586. Use of uninitialized value in substitution (s///) at C:/Perl/site/lib/ +File/Find/Rule.pm line 586. Use of uninitialized value in substitution (s///) at C:/Perl/site/lib/ +File/Find/Rule.pm line 586. invalid top directory at C:/Perl/lib/File/Find.pm line 593.

Replies are listed 'Best First'.
Re^3: How to delete empty files
by leocharre (Priest) on Jan 11, 2008 at 11:03 UTC

    It seems that what gave you an error message was "C:/Perl/lib/File/Find.pm line 593", to be more precise 'invalid top directory'.

    What is your directory argument? Are you leaving it at $ENV{HOME} ? Is this environment variable even set on a windows system?

    Add this to the first lines of code, before we instance File::Find::Rule..

    defined $ENV{HOME} or die("ENV HOME is not defined."); print STDERR " # env home is set at $ENV{HOME}\n"; -d $ENV{HOME} or die("ENV HOME is not a directory");
    (You can always bite the bullet and switch to linux. It takes about a year to get comfortable, if you're considering.)

    Furthermore, *DONT RUN THAT SCRIPT*, it's just an example script! :-)

    Substitute $ENV{HOME} with something like 'C:\path\to\where\you\suspect\empty\files\reside'.

    And *read* File::Find::Rule!

    Don't give up so easily- if something does not work, that's when you start 'debugging'. Takes up most of my time, between tests (.t) and errors, and the fact that a third of my code is to check and recheck return values and results.. In the long run it's saved me a lot of sweat and blood.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://661764]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2026-04-13 18:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.