Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Welcome to the Monastery
 
PerlMonks  

Re: Shell usable?

by amphiplex (Monk)
on Jul 02, 2002 at 11:38 UTC ( [id://178885]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Shell usable?

Hi !

I believe you are doing a bit too much here, this should work:
#!/usr/bin/perl -w use strict; use Shell qw( ls touch ); touch( "dummy" ); ls( "dummy" );

---- kurt

Replies are listed 'Best First'.
Re: Re: Shell usable?
by axelrose (Scribe) on Jul 02, 2002 at 11:42 UTC
    You're right. This is a silly example but imagine some intermedia processing with the dummy file ... the error pops up the second time I use the $sh->ls.
Re: Re: Shell usable?
by axelrose (Scribe) on Jul 02, 2002 at 11:57 UTC
    sorry, I misunderstood you saying "doing too much"
    I tried again not using OO style
    #!/usr/bin/perl -w use strict; use Shell qw( ls touch ); touch( "dummy" ) or die "touch: $!"; ls( "dummy" ) or die "first ls: $!"; ls( "dummy" ) or die "second ls: $!";
    and get different error messages:
    $ rm dummy $ perl shell-test.pl touch: Illegal seek at shell-test.pl line 6. $ touch dummy $ perl shell-test.pl touch: Illegal seek at shell-test.pl line 6.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://178885]
help
Sections?
Information?
Find Nodes?
Leftovers?
    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.