perl command line and file handle.

Discussion in 'Perl Misc' started by Stephen, Jan 14, 2004.

  1. Stephen

    Stephen Guest

    Hello,
    would the following work if the file name myprog.pl was replaced with
    a filehandle or a reference to a filehandle?

    system("perl myprog.pl ".$argvc);

    this assumes you are using a tied buffer system
    and have sent a list of commands into it

    tie *FH, 'tiedbuff';
    print FH "print \"Hello World\"\n";
    print FH "print \"Goodbye World\"\n";
    print FH "exit\;\n";


    Stephen
     
    Stephen, Jan 14, 2004
    #1
    1. Advertising

  2. In article <>,
    Stephen <> wrote:
    : would the following work if the file name myprog.pl was replaced with
    :a filehandle or a reference to a filehandle?

    : system("perl myprog.pl ".$argvc);

    No.

    Depending on the system, you -might- be able to use -f /dev/fd$N
    where $N = fileno FILEHANDLE

    If not, then you probably need to see perlipc
    "Bidirectional Communication with Another Process"
    --
    Rump-Titty-Titty-Tum-TAH-Tee -- Fritz Lieber
     
    Walter Roberson, Jan 14, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dietrich
    Replies:
    1
    Views:
    649
    Joe Smith
    Jul 22, 2004
  2. Leon
    Replies:
    2
    Views:
    536
  3. scad
    Replies:
    23
    Views:
    1,178
    Alf P. Steinbach
    May 17, 2009
  4. Replies:
    2
    Views:
    163
    Tad McClellan
    Mar 26, 2005
  5. Ting Wang
    Replies:
    3
    Views:
    198
    Paul Lalli
    Dec 13, 2005
Loading...

Share This Page