[Chicago-talk] trouble caputuring return value

Richard Reina richard at rushlogistics.com
Wed Mar 31 05:37:16 PDT 2010


I have a program that opens a separate terminal and prompts the user for some information.  However, for some reason I can't seem to capture the return value.  Does anyone happen to know why the value returned by get_info.pl is not getting returned? Any help would really be appreciated.

Thanks
Richard

#!/usr/bin/perl -w 

use strict;
my $info;

system(q{gnome-terminal --geometry=80x12-0-30 -x perl -e 'require "./get_info.pl"; ($info) = get_input();'});

print $info . "\n";


<<<<<<< get_info.pl >>>>>>>>
#!/usr/bin/perl -w

use strict;

print "Enter Info\n";
chomp (my $info = <STDIN>);

return $info;


More information about the Chicago-talk mailing list