Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Printing values from references

by fuzzyping (Chaplain)
on Sep 13, 2003 at 23:57 UTC ( [id://291316]=note: print w/replies, xml ) Need Help??


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;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://291316]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-09-09 05:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.