in reply to Re: Changing -> to work within a string
in thread Changing -> to work within a string
Will execute the "ls" on the work directory. Using the tie I would want to write$machine->shell("ls " . $machine->work_dir);
The problem is - I actually have two variables - an object $machine, and a hash %machine. But the user don't know it, and I want the user to be able to wrap this line like this:$machine->shell("ls $machine{work_dir}");
If the user will need to do double shift, it will ruin the whole idea.sub do_ls { my $machine = shift; $machine->shell("ls $machine{work_dir}"); }
|
|---|