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

Re: Correct way to use system()?

by gwadej (Chaplain)
on Aug 13, 2009 at 17:13 UTC ( #788386=note: print w/replies, xml ) Need Help??


in reply to Correct way to use system()?

You're problem has nothing to do with system. The problem is in these lines.

my $dir = @dirs_sunflarebeam; #print "$dirs\n"; system("getfacl", "$dir");

$dir contains the count of the items in @dirs_sunflarebeam, not the first item. The call to getfacl can't find a file named 1. You probably meant my $dir = $dirs_sunflare_beam[0];

One minor nit: You don't need the quotes around $dir in the last statement. They really have no effect.

Update: formatting correction.

G. Wade

Replies are listed 'Best First'.
Re^2: Correct way to use system()?
by xjlittle (Beadle) on Aug 13, 2009 at 17:40 UTC
    I found it. I had an array # that I didn't want. Thanks for your help. I remove the "" as well.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://788386]
help
Chatterbox?
[Your Mother]: Don't think so.
[Your Mother]: Windows doesn't even recognize them as far as that goes.
[Lady_Aleena]: Your Mother, thanks. I had a feeling it would be no.
[Your Mother]: :P
[Lady_Aleena]: Your Mother, it is a good thing I am no on Windows.
[Lady_Aleena]: s/no/not/;
[Lady_Aleena]: My blasted web host will not put perl 5.22 in /usr/bin/perl, it is in /usr/local/cpanel/ 3rdparty/bin/perl
Lady_Aleena has been banging her head against this wall for years now with no success on breaking the wall.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2017-04-28 06:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (519 votes). Check out past polls.