vietboy505
Technical User
How can I use Perl to return to another script that I call?
Any help?
Here is my nameconfig.pl file.
and here is my other script to call this nameconfig.pl
OUTPUT
Any help?
Here is my nameconfig.pl file.
PHP:
#!/usr/local/bin/perl
$names="a";
%name =(
"a" => "andy",
"b" => "ben",
"c" => "cat"
);
return "$name{$names}";
and here is my other script to call this nameconfig.pl
PHP:
#!/usr/local/bin/perl
$what=`nameconfig.pl` . " was here!";
print("NAME: " . $what . "\n\n");
$another=`nameconfig.pl`;
print("NAME: " . $another . "was here and it did work!\n\n");
OUTPUT
Code:
Can't return outside a subroutine at C:\SCRIPT\nameconfig.pl line 11.
NAME: was here!
Can't return outside a subroutine at C:\SCRIPT\nameconfig.pl line 11.
NAME: was here and it did work!