Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: system, pipes, shell, quoting

by superpete (Beadle)
on Nov 13, 2002 at 20:04 UTC ( [id://212674]=note: print w/replies, xml ) Need Help??


in reply to Re: system, pipes, shell, quoting
in thread system, pipes, shell, quoting

#!/usr/bin/perl $fname = "foo\nbar"; #-- standard idiot-proof open $fname = "./$fname" if $fname =~ /^\s/; open F, "> $fname\0"; print F "testing 1 2 3\n"; close F; system("cat \Q$fname\E"); # produces error unlink $fname;

Replies are listed 'Best First'.
Re: Re: Re: system, pipes, shell, quoting
by BrowserUk (Patriarch) on Nov 13, 2002 at 21:00 UTC

    And do you have any way of accessing a file who's name contains an embedded newline from your shell?

    Ie. Can you type the cat command at the CLI and have it work?


    Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
    Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
    Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
    Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-25 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found