On Jun 6, 2006, at 12:59, joseph wrote:
All,
Just like to ask for correction on what's wrong with my script it
gives spit
out this error when i run it.
Unsuccessful open on filename containing newline at disksize.pl
line 8.
Can't open file No such file or directory
But it runs without this error whenever i feed it up when an
existing file
output by df-h.
ex:## open(FL,"path/toactual/file") or die "blabalha";
Does this mean it can't trap the output of `df-h`?
Dealing with system commands (ls, ps, df, etc.) that way is usually
much tricky than it looks. Normally one goes to CPAN and checks
whether someone has done it right already. In that case one installs
the module and writes an easy and robust script in 5 minutes.
For this particular problem delegate to Sys::Filesystem.
-- fxn
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>