[29968] in Perl-Users-Digest
Perl-Users Digest, Issue: 1211 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 18 14:10:01 2008
Date: Fri, 18 Jan 2008 11:09:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 18 Jan 2008 Volume: 11 Number: 1211
Today's topics:
AuthDBI log out is it possible <jcharth@gmail.com>
Re: AuthDBI log out is it possible <joost@zeekat.nl>
Re: Chat client/server print failed <deadpickle@gmail.com>
Re: Chat client/server print failed <zentara@highstream.net>
Client Program not Receiving Message from Server <deadpickle@gmail.com>
Re: Filtering two files with uncommon column <josef.moellers@fujitsu-siemens.com>
Re: Filtering two files with uncommon column <tadmc@seesig.invalid>
Re: Help: Login FTP <tadmc@seesig.invalid>
how to put subroutines in separate files and call? birdsong9@gmail.com
Re: how to put subroutines in separate files and call? <joost@zeekat.nl>
Re: how to put subroutines in separate files and call? <jurgenex@hotmail.com>
Re: how to put subroutines in separate files and call? birdsong9@gmail.com
Re: how to put subroutines in separate files and call? <smallpond@juno.com>
Re: how to put subroutines in separate files and call? birdsong9@gmail.com
Re: non nntp usenet <smallpond@juno.com>
Pipe input over several scripts <spoertsch@gmail.com>
Re: Pipe input over several scripts xhoster@gmail.com
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 18 Jan 2008 10:24:36 -0800 (PST)
From: joe <jcharth@gmail.com>
Subject: AuthDBI log out is it possible
Message-Id: <1e3de61e-5985-4fd1-a1e1-dd086885113e@e4g2000hsg.googlegroups.com>
Hello I am using AuthDBI in my apache server, is there a way to code a
log out button? thanks.
------------------------------
Date: Fri, 18 Jan 2008 20:06:17 +0100
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: AuthDBI log out is it possible
Message-Id: <8763xrdkd2.fsf@zeekat.nl>
joe <jcharth@gmail.com> writes:
> Hello I am using AuthDBI in my apache server, is there a way to code a
> log out button? thanks.
/As far as I know/ you can't force a log out from basic authentication
from the server. Clients will usually remember the login credentials
until they're restarted.
Joost.
------------------------------
Date: Fri, 18 Jan 2008 07:59:10 -0800 (PST)
From: deadpickle <deadpickle@gmail.com>
Subject: Re: Chat client/server print failed
Message-Id: <97881cf1-b3fe-4c87-b84a-1471a0b1868b@k39g2000hsf.googlegroups.com>
I suspect it is the Glib::Timeout that is not working right. I tried
putting a print statement in the wait_for_msg sub and it only printed
once and it should be printing continuously. Is there a better way to
create a timer in Gtk2?
------------------------------
Date: Fri, 18 Jan 2008 12:05:50 -0500
From: zentara <zentara@highstream.net>
Subject: Re: Chat client/server print failed
Message-Id: <o1n1p3tb7h2nikotij8gvqq0htnpjudmsf@4ax.com>
On Fri, 18 Jan 2008 07:59:10 -0800 (PST), deadpickle
<deadpickle@gmail.com> wrote:
>I suspect it is the Glib::Timeout that is not working right. I tried
>putting a print statement in the wait_for_msg sub and it only printed
>once and it should be printing continuously. Is there a better way to
>create a timer in Gtk2?
Timers in Gtk2 will stop unless you return 1 from it's sub.
At the end of your wait_for_msg sub, put
return1;
Usually, you setup a test, to return a 1 or 0, depending on
whether you want to stop the timer.
zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
------------------------------
Date: Fri, 18 Jan 2008 09:27:26 -0800 (PST)
From: deadpickle <deadpickle@gmail.com>
Subject: Client Program not Receiving Message from Server
Message-Id: <9704965c-fde7-4894-940f-95674b16afe0@q77g2000hsh.googlegroups.com>
My chat client/server program does not seem to be receiving messages.
It utilizes a Glib::Timeout to loop a sub named wait_for_msg that
listen for the server to send the message so that it can be received
and displayed in the Textview widget. The program connects to the
server fine, logs in great. When the user types in the entry box and
hits send, the program sends the entered message to the server and it
is then sent to all clients including the author of the message. The
problem is that the client is not receiving the message from the
server; I suspect it is the timer. I tried printing text in the loop
to see if it was still running but it only printed once which could
mean that it has stopped working. Any ideas on how to remedy this
problem?
#!/usr/bin/perl
# Flow of the Program:
# *Send message to the server - send_msg_all
# *Connect to the server - sub connect_server
# -unblock the server - nonblock
# -Login to the server - send_login
# -Timer started to wait for messages - wait_for_msg
# >Handler - handle
# $Process the incoming messages - process_incoming
# @Recieve messages and display in textview - rcv_msg_all
use warnings;
use strict;
use Gtk2 -init;
use Glib qw/TRUE FALSE/;
use IO::Socket::INET;
use Tie::RefHash;
use IO::Select;
#global variables
my $buffer;
my $host = "Deadpickle-hobo";
my $port = 6666;
my $conn_stat = 'idle';
my %inbuffer = ();
my %outbuffer = ();
my %ready = ();
my $select;
my $conn;
my $user;
#the main chat widget
my $main_window = Gtk2::Window->new("toplevel");
$main_window->signal_connect(delete_event => sub {Gtk2->main_quit;});
$main_window->set_default_size(250, 200);
my $table = Gtk2::Table->new(4, 2, FALSE);
$buffer = Gtk2::TextBuffer->new;
my $button = Gtk2::Button->new("Send");
my $entry = Gtk2::Entry->new();
my $label = Gtk2::Label->new("Chat Client Test");
my $textview = Gtk2::TextView->new_with_buffer($buffer);
$textview->set_cursor_visible (FALSE);
my $swindow = Gtk2::ScrolledWindow->new( undef, undef);
$swindow->set_policy( 'automatic', 'automatic');
$swindow->set_shadow_type( 'etched-out');
$swindow->add( $textview);
$table->attach_defaults($label, 0, 1, 0, 1);
$table->attach_defaults($swindow, 0, 2, 1, 3);
$table->attach_defaults($entry, 0, 1, 3, 4);
$table->attach_defaults($button, 1, 2, 3, 4);
$main_window->add($table);
$main_window->show_all();
$button->signal_connect("clicked" => sub { send_msg_all($entry-
>get_text); $entry->set_text('');} );
#run the login dialog
dialog($buffer);
Gtk2->main;
#-------------------Login Dialog-------------------
sub dialog{
my $buffer = shift;
my $dialog_window = Gtk2::Window->new('toplevel');
$dialog_window->signal_connect(delete_event => sub {Gtk2-
>main_quit});
my $dialog_table = Gtk2::Table->new(2, 2, FALSE);
my $dialog_label1 = Gtk2::Label->new('Chat Login:');
my $dialog_label2 = Gtk2::Label->new('User:');
my $dialog_label3 = Gtk2::Label->new('Host:');
my $chat_user = Gtk2::Entry->new();
$chat_user->set_text('');
my $dialog_button1 = Gtk2::Button->new('Connect');
$dialog_table->attach_defaults($dialog_label1, 0, 1, 0, 1);
$dialog_table->attach_defaults($chat_user, 1, 2, 0, 1);
$dialog_table->attach_defaults($dialog_button1, 1, 2, 1, 2);
$dialog_button1->signal_connect("clicked" => sub {$user = $chat_user-
>get_text; $dialog_window->destroy; $buffer->insert(($buffer-
>get_end_iter), "Username: $user...\n"); connect_server()});
$dialog_window->add($dialog_table);
$dialog_window->show_all;
return 1;
}
#------------------Connect to server---------------------
#establishes connection to the server
sub connect_server{
if ($conn_stat ne 'connected') {
$buffer->insert(($buffer->get_end_iter), "Connecting to Server
$host:$port...\n");
$conn = IO::Socket::INET->new(PeerAddr => $host, PeerPort =>
$port, Proto => 'tcp') or popup_err(1);
if ($conn) {
%inbuffer = ();
%outbuffer = ();
%ready = ();
tie %ready, 'Tie::RefHash';
nonblock($conn);
$select = IO::Select->new($conn);
$conn_stat = 'connected';
$buffer->insert(($buffer->get_end_iter), "Connected!\n");
#send login to server
send_login();
#start the timer that monitors incoming messages
my $timer_waiting = Glib::Timeout->add(100, \&wait_for_msg);
}
}
}
#-------------------Error popup-------------------
# pops up an error message
sub popup_err{
my ($error_code) = @_;
my $error;
if ($error_code == 1) {$error = "Cannot create Socket!"}
elsif ($error_code == 2) {$error = "Username to Short!"}
elsif ($error_code == 3) {$error = "No connection Established!"}
elsif ($error_code == 4) {$error = "Already Logged on with This User
Name!"}
elsif ($error_code == 5) {$error = "Not Connected!"}
else {$error = "Unkown Error!"}
$buffer->insert(($buffer->get_end_iter), "$error\n");
my $error_dialog = Gtk2::MessageDialog->new($main_window, 'destroy-
with-parent', 'error', 'ok', "$error");
$error_dialog->run;
$error_dialog->destroy;
}
#-------------------blocking-------------------
# nonblock($socket) puts socket into nonblocking mode
sub nonblock { my $socket = shift; $socket->blocking(0);}
#-------------------Message Waiting-------------------
# Wait for incoming messages from the server relayed from clients
sub wait_for_msg {
if ($conn_stat eq 'connected') {
my ($list_size, $msg);
my $server;
my $rv;
my $data;
print "waiting..\n";
# check for new information on the connections we have
# anything to read or accept?
foreach $server ($select->can_read(1)) {
# read data
$data = '';
$rv = $server->recv($data, 'POSIX::BUFSIZ', 0);
$inbuffer{$server} .= $data;
# test whether the data in the buffer or the data we
# just read means there is a complete request waiting
# to be fulfilled. If there is, set $ready{$client}
# to the requests waiting to be fulfilled.
while ($inbuffer{$server} =~ s/(.*\n)//) {
push( @{$ready{$server}}, $1 );
}
}
# Any complete requests to process?
foreach $server (keys %ready) {
handle($server);
}
}
}
#-------------------Handler-------------------
# handle($socket) deals with all pending requests for $client
sub handle {
# requests are in $ready{$server}
# send output to $outbuffer{$server}
my $server = shift;
my $request;
print "HANDLER WORKING\n";
foreach $request (@{$ready{$server}}) {
# $request is the text of the request
# put text of reply into $outbuffer{$client}
chomp $request;
process_incoming($server, $request);
}
delete $ready{$server};
}
#-------------------Process Incoming-------------------
sub process_incoming {
my ($server, $msg) = @_;
my @logged_users;
my @rcvd_msg = split(/::/, $msg);
if ($rcvd_msg[1] eq "1") {
if($rcvd_msg[2] eq "03") {
print "Successfully Logged in!\n";
} elsif ($rcvd_msg[2] eq "12") {
popup_err(4);
} else {
# Create pop-up for error!
print "Error Logging in ", $msg, "\n";
popup_err(5);
}
}
elsif ($rcvd_msg[1] eq "7") {
# receive global message
print "$msg\n";
rcv_msg_all($rcvd_msg[3], $rcvd_msg[4
} else {
print "Unrecognized response: $msg\n";
exit(0);
}
}
#-------------------Send message to all-------------------
sub send_msg_all {
my ($msg) = @_;
print "$conn\n";
if(defined $conn) {
# Send a the Message to server
print "Sending\n";
print $conn "7\:\:$user\:\:$msg\n";
} else {
popup_err(3);
}
}
#-------------------Send login-------------------
#logs the user name on the server
sub send_login {
# my ($u) = @_;
if(defined $conn) {
if(length($user) > 0) {
#send login to server
print $conn "1\:\:$user\n";
# update_info();
} else {
popup_err(2);
}
} else {
popup_err(3);
}
}
#-------------------Display All Message-------------------
sub rcv_msg_all {
my ($from, $msg) = @_;
print "Received Global message:\n";
if(defined $conn) {
print "Already Connected: Proceeding with message!\n";
$buffer->insert(($buffer->get_end_iter), "$from: $msg\n");
} else {
print "No connection established!\n";
popup_err(3);
}
}
------------------------------
Date: Fri, 18 Jan 2008 13:01:46 +0100
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: Filtering two files with uncommon column
Message-Id: <fmq4ff$8vi$1@nntp.fujitsu-siemens.com>
Madhur wrote:
> I would like to know the best way of generating filter of two files
> based upon the following condition
>=20
> I have two files. Contents of the first file is
>=20
> File 1
> abc def hij
> asd sss lmn
> hig pqr mno
>=20
>=20
> File 2
>=20
> jih def asd
> poi iuu wer
> wer pqr jjj
>=20
> I would like have the output as
> Output
>=20
> File1
> asd sss lmn
> File2
> poi iuu wer
>=20
> Basically I want to compare the two files based on second column. If
> the second
> column matches on both the files do not print anything, else if there
> is no matc
> h in for the second column for first file in second file then print it
> under Fil
> e1 header, else if there is no match for the second column for second
> file in fi
> rst file print it under File2 header.
First: divide and conquer! You actually have two problems: print all=20
lines from file1 which have no corresponding line(s) in file2 and print=20
all lines from file2 which have no corresponding line(s) in file 1.
In order to solve the problem "print all lines from fileA which have no=20
corresponding line(s) in fileB", have a look at hashes. Also, for this=20
particular problem, "split" might come in usefull.
--=20
These are my personal views and not those of Fujitsu Siemens Computers!
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html
------------------------------
Date: Fri, 18 Jan 2008 06:01:47 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Filtering two files with uncommon column
Message-Id: <slrnfp159b.1cf.tadmc@tadmc30.sbcglobal.net>
Madhur <madhurrajn@gmail.com> wrote:
> I would like to know the best way of generating filter of two files
> based upon the following condition
>
> I have two files. Contents of the first file is
>
> File 1
> abc def hij
> asd sss lmn
> hig pqr mno
>
>
> File 2
>
> jih def asd
> poi iuu wer
> wer pqr jjj
>
> I would like have the output as
> Output
>
> File1
> asd sss lmn
> File2
> poi iuu wer
>
> Basically I want to compare the two files based on second column. If
> the second
> column matches on both the files do not print anything, else if there
> is no matc
> h in for the second column for first file in second file then print it
> under Fil
> e1 header, else if there is no match for the second column for second
> file in fi
> rst file print it under File2 header.
--------------------------------
#!/usr/bin/perl
use warnings;
use strict;
my @f1 = ( 'abc def hij', 'asd sss lmn', 'hig pqr mno' );
my @f2 = ( 'jih def asd', 'poi iuu wer', 'wer pqr jjj' );
my %lines;
foreach my $line ( @f1 ) {
my(undef, $field) = split /\s+/, $line;
$lines{$field}{f1} = $line;
}
foreach my $line ( @f2 ) {
my(undef, $field) = split /\s+/, $line;
$lines{$field}{f2} = $line;
}
print "File1\n";
foreach my $field ( keys %lines ) {
print "$lines{$field}{f1}\n" unless exists $lines{$field}{f2};
}
print "File2\n";
foreach my $field ( keys %lines ) {
print "$lines{$field}{f2}\n" unless exists $lines{$field}{f1};
}
--------------------------------
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Thu, 17 Jan 2008 17:31:02 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Help: Login FTP
Message-Id: <slrnfovp9m.nfe.tadmc@tadmc30.sbcglobal.net>
Amy Lee <openlinuxsource@gmail.com> wrote:
> On Thu, 17 Jan 2008 16:22:18 +0100, Peter Ludikovsky wrote:
>
>> 1) Go to http://search.cpan.org/
>> 2) In the textbox enter "FTP"
>> 3) Click on the first result
>> 4) Read & meditate
> Thanks your advice. However I've done this before I posted this article.
> There are so many modules about FTP, I can't find what actually I need. So
> could you tell me more details?
You appear to not have followed step 3...
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Fri, 18 Jan 2008 09:44:14 -0800 (PST)
From: birdsong9@gmail.com
Subject: how to put subroutines in separate files and call?
Message-Id: <11111f53-9530-46cf-ae89-ce65b3a6ab9e@k2g2000hse.googlegroups.com>
I'm a novice perl programmer but have been thinking about this
question for a long time and finally decided to see if I could get
some advice... I have a program that is several thousand lines of
code, mostly broken up into dozens of subroutines, and if it's
possible to do so would like to be able to call a subroutine that is
stored in a separate file location and have it share data back and
forth with my program. Is it possible to do this without creating
modules?
Any assistance would be greatly appreciated.
------------------------------
Date: Fri, 18 Jan 2008 18:56:20 +0100
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: how to put subroutines in separate files and call?
Message-Id: <87abn3dnln.fsf@zeekat.nl>
birdsong9@gmail.com writes:
> I'm a novice perl programmer but have been thinking about this
> question for a long time and finally decided to see if I could get
> some advice... I have a program that is several thousand lines of
> code, mostly broken up into dozens of subroutines, and if it's
> possible to do so would like to be able to call a subroutine that is
> stored in a separate file location and have it share data back and
> forth with my program. Is it possible to do this without creating
> modules?
>
> Any assistance would be greatly appreciated.
What you want is modules, which in short are files containing perl code
that can be imported into your main program with the use() and require()
commands.
See the perlmod and perlmodlib manual pages.
Joost.
------------------------------
Date: Fri, 18 Jan 2008 18:07:35 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: how to put subroutines in separate files and call?
Message-Id: <cjq1p3hk5q140oo5b5eae5o7htdeim3lpj@4ax.com>
birdsong9@gmail.com wrote:
>I'm a novice perl programmer but have been thinking about this
>question for a long time and finally decided to see if I could get
>some advice... I have a program that is several thousand lines of
>code, mostly broken up into dozens of subroutines, and if it's
>possible to do so would like to be able to call a subroutine that is
>stored in a separate file location and have it share data back and
>forth with my program. Is it possible to do this
That's what modules are for.
> without creating modules?
Well, you could use e.g. do(), but modules are the better method.
jue
------------------------------
Date: Fri, 18 Jan 2008 10:12:12 -0800 (PST)
From: birdsong9@gmail.com
Subject: Re: how to put subroutines in separate files and call?
Message-Id: <0567bfa5-9c93-4182-b885-d7f93650dd85@s19g2000prg.googlegroups.com>
On Jan 18, 10:07=A0am, J=FCrgen Exner <jurge...@hotmail.com> wrote:
> birdso...@gmail.com wrote:
> >I'm a novice perl programmer but have been thinking about this
> >question for a long time and finally decided to see if I could get
> >some advice... I have a program that is several thousand lines of
> >code, mostly broken up into dozens of subroutines, and if it's
> >possible to do so would like to be able to call a subroutine that is
> >stored in a separate file location and have it share data back and
> >forth with my program. =A0Is it possible to do this
>
> That's what modules are for.
>
> > without creating modules?
>
> Well, you could use e.g. do(), but modules are the better method.
>
> jue
Thanks- just hoping there was a more straightforward way to do this.
For me, modules seem daunting. I appreciate the quick feedback.
------------------------------
Date: Fri, 18 Jan 2008 10:36:39 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: how to put subroutines in separate files and call?
Message-Id: <ce4a0f48-ff53-43a9-a581-b9ab41567d2e@x69g2000hsx.googlegroups.com>
On Jan 18, 12:44 pm, birdso...@gmail.com wrote:
> I'm a novice perl programmer but have been thinking about this
> question for a long time and finally decided to see if I could get
> some advice... I have a program that is several thousand lines of
> code, mostly broken up into dozens of subroutines, and if it's
> possible to do so would like to be able to call a subroutine that is
> stored in a separate file location and have it share data back and
> forth with my program. Is it possible to do this without creating
> modules?
>
> Any assistance would be greatly appreciated.
modules are not as hard as you probably think they are.
Put one sub in a file foo.pm and add 'use foo;' in your
main program. Edit it while reading the perlmod docs
and just do the minumum to get it working. Post here if
you get stuck.
If you are using global variables in your subroutines then
1) you shouldn't be, and
2) you need to declare them 'our' instead of 'my'
to use them from a different package as $main::myglobal;
------------------------------
Date: Fri, 18 Jan 2008 10:54:57 -0800 (PST)
From: birdsong9@gmail.com
Subject: Re: how to put subroutines in separate files and call?
Message-Id: <8608590f-75c7-4504-b2ab-8fa4e1c8decc@l1g2000hsa.googlegroups.com>
On Jan 18, 10:36=A0am, smallpond <smallp...@juno.com> wrote:
> On Jan 18, 12:44 pm, birdso...@gmail.com wrote:
>
> > I'm a novice perl programmer but have been thinking about this
> > question for a long time and finally decided to see if I could get
> > some advice... I have a program that is several thousand lines of
> > code, mostly broken up into dozens of subroutines, and if it's
> > possible to do so would like to be able to call a subroutine that is
> > stored in a separate file location and have it share data back and
> > forth with my program. =A0Is it possible to do this without creating
> > modules?
>
> > Any assistance would be greatly appreciated.
>
> modules are not as hard as you probably think they are.
> Put one sub in a file foo.pm and add 'use foo;' in your
> main program. =A0Edit it while reading the perlmod docs
> and just do the minumum to get it working. =A0Post here if
> you get stuck.
>
> If you are using global variables in your subroutines then
> =A0 1) you shouldn't be, and
> =A0 2) you need to declare them 'our' instead of 'my'
> to use them from a different package as $main::myglobal;
Thanks for the encouragement- I'll give it a shot.
------------------------------
Date: Fri, 18 Jan 2008 07:25:52 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: non nntp usenet
Message-Id: <dd222dbd-3ece-4d65-adfd-e2b5de7195e4@s13g2000prd.googlegroups.com>
On Jan 18, 4:27 am, "Regan Revised" <inva...@invalid.net> wrote:
> How can Outlook Express pick up usenet messages that net::nntp can't?
>
> --
>
> Reagan Revision
Extraordinary claims require extraordinary evidence.
--S
------------------------------
Date: Fri, 18 Jan 2008 06:35:03 -0800 (PST)
From: spoertsch <spoertsch@gmail.com>
Subject: Pipe input over several scripts
Message-Id: <8b230048-b186-4f87-8010-3be19fe63c0c@p69g2000hsa.googlegroups.com>
Hi,
I'm executing a script with an IPC::open2 call and pipe some input
parameter in it. So that works fine. That script uses some of the
input paramter and has to pipe the rest to another script that is
started by that script. And that is the part where it doesn't work
anymore. The last script is startet using a system() call:
scriptA starts scriptB with open2
scriptB starts scriptC with system
scriptA passes input for scriptB and scriptC to scriptB
How to pass the input from scriptB to scriptC?
The whole thing is needed to achieve an automation for an installation
process which has several scripts. The problem is that i cant change
too much on scriptB, because it should still work for a manual
installation.
Normally scriptB and scriptC ask for some input on stdin and now i
have to pass the predefined input to those scripts for the automation
without changing the manual installation.
Thanks
spoertsch
------------------------------
Date: 18 Jan 2008 17:15:54 GMT
From: xhoster@gmail.com
Subject: Re: Pipe input over several scripts
Message-Id: <20080118121556.440$CQ@newsreader.com>
spoertsch <spoertsch@gmail.com> wrote:
> Hi,
>
> I'm executing a script with an IPC::open2 call and pipe some input
> parameter in it. So that works fine. That script uses some of the
> input paramter and has to pipe the rest to another script that is
> started by that script. And that is the part where it doesn't work
> anymore. The last script is startet using a system() call:
>
> scriptA starts scriptB with open2
> scriptB starts scriptC with system
> scriptA passes input for scriptB and scriptC to scriptB
> How to pass the input from scriptB to scriptC?
Post three short scripts which illustrate this, and whatever problem you
are having with it. The only problem I see is with deadlock--avoid that
and it should just work.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 1211
***************************************