in reply to Re: Printing values from references
in thread Printing values from references

That sounds about right. The only problem is that I can't leave it outside the quotes**, since it's going to be in a system() call for the real script. If anyone can remember how to escape a full reference string like that, I'd be very grateful.

** Of course, I can simply read the value into a scalar variable and put that into the system() call, but it seems so inefficient. :)

-fp
  • Comment on Re: Re: Printing values from references

Replies are listed 'Best First'.
Re: Re: Re: Printing values from references
by Fletch (Bishop) on Sep 14, 2003 at 00:31 UTC

    Perhaps you're thinking of something along the lines of:

    system "frobnitz --oik @{[ $something->method ]}"

    Of course some would consider that uglier than a temporary. Also remember that system() will take a list just fine (presuming you're not dependent on it being passed to a shell for redirection or what not).

      Good call, on both points. That works, but you're right... it's ugly and very unintuitive. I think I'll just use the temp as you've suggested. Thanks!

      -fp
Re: Re: Re: Printing values from references
by gryphon (Abbot) on Sep 14, 2003 at 05:01 UTC

    Greetings fuzzyping,

    So why not just do the following?

    system('cmd_line stuff ' . $part->bodyhandle->path . ' and_stuff');

    gryphon
    code('Perl') || die;