Hello,
I encounter following requirements:
1. accept customized perl sentences;
2. provide variables exchange between customized perl sentences and my
routine.

Here is a sample:

[code]
use strict;
use warnings;

# we use $_ to pass value in and out
$_ = qw/foo/;
my $cmds = "print $_; $_ = qw/bar/";
eval {$cmds};
my $result = $_;
print $result;
[/code]

But I got a error: Useless use of private variable in void context at
ss.pl line 7. So how can I do? Thanks in advance.


Best regards, 
Bingfeng 



Reply via email to