Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Newline Delimited Input

by Anonymous Monk
on Jun 11, 2003 at 05:07 UTC ( [id://264958]=note: print w/replies, xml ) Need Help??


in reply to Re: Newline Delimited Input
in thread Newline Delimited Input

Here is the part I took out:
#Displays total size of specified path (total includes subfolders) foreach my $dir (@parts) { my $total; print "\nWalking $dir\n"; find(sub { $total += -s }, $dir); $total = ($total / 1024) / 1024; $total = sprintf("%0.2f", $total); print OUT "$dir, $total, mb, \n"; } print "\n\tOutput created.\n"; close(OUT);

Replies are listed 'Best First'.
Re: Re: Re: Newline Delimited Input
by CukiMnstr (Deacon) on Jun 11, 2003 at 07:07 UTC
    so you are not chomp()ing $dir... are you getting something like
    Unsuccessful stat on filename containing newline at...
    when you run your script? Did you try chomp()ing the filenames as I suggest here?

    hope this helps,

      Thanks for your help!! Adding chomp ( @parts = <IN> ); got everything working correctly.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-19 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found