[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PERL] Shell module



Det var sådan noget jeg søgte. Jeg havde forsøgt at læse dokumentationen til
Shell modulet man fattede tydeligvis ikke en brik. Jeg vidste ganske enkelt
ikke hvordan jeg smed parametre til min kommando - ganske enkelt.

Tak for hjælpen

"Peter Makholm" <sslug@sslug> wrote in message
news:sslug@sslug
> "Simon B. Nielsen" <sslug@sslug> writes:
>
> > Jeg mener ikke spørgsmålet er Windows specifikt. Er det til stor gene
for
>
> Kald af eksterne programmer er windows-specifikt. Der er alle slags
> portabilitetsproblemer når du prøver på den slags. Iøvrigt virker
> Shell-modulet ikke som du antager.
>
> Iøvrigt, for at skrive noget konkret om dit problem, når du skriver:
>
> use Shell qw(foo bar baz);
>
> Vil Shell.pm automatisk lave tre funktioner:
>
> sub foo {
>     return system "foo", @_;
> }
> sub bar {
>     return system "bar", @_;
> }
> sub baz {
>     return system "baz", @_;
> }
>
> og ikke en funktion
>
> sub foo bar baz {  # Hvordan perl så end skulle fortolke dette.
>     return system "foo", "bar", "baz";
> }
>
> Som du tilsyneladende vil have.
>
> Antaget at pgp er i din path ønsker du måske noget ligende:
>
> use Shell qw(pgp);
> $sh = new Shell;
>
> # Og så enten:
> $sh->pgp( qw(-e -r sslug@sslug -r sslug@sslug -o
encrypted.pgp source.txt) );
> # Eller
> $sh->pgp("-e -r sslug@sslug -r sslug@sslug -o
encrypted.pgp source.txt");
>
>
> Men om det ene eller andet virker er igen specifikt af hvilken shell
> perl bruger til at udføre system-funktionen. (Men det bliver vist
> først rigtig slemt når man prøver at lave file-globbing).
>
> --
> Når folk spørger mig, om jeg er nørd, bliver jeg altid ilde til mode
> og svarer lidt undskyldende: "Nej, jeg bruger RedHat".
>                                 -- Allan Olesen på dk.edb.system.unix
>




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:54 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *