Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: When is a logical or not logical

by rah (Monk)
on May 10, 2003 at 03:41 UTC ( [id://257069]=note: print w/replies, xml ) Need Help??


in reply to Re: When is a logical or not logical
in thread When is a logical or not logical

I like the system explaination - makes sense. Thanks for the link.

The backtick case may have been when I was still battling permissions problems. In that case I believe you are right on the mark, because without correct permissions, the command runs, but gives no output. I'll need to re-examine that now that I have those resolved.

Unfortunately that still leaves the "open" case. This one is not permissions. The curious thing is that it does create a 0 byte file, then dies. I actually had two typos in my OP. Should have been:

open (LOGFILE, ">$logfile") or die "Can't open $logfile: $!";

Replies are listed 'Best First'.
Re: Re: Re: When is a logical or not logical
by NetWallah (Canon) on May 10, 2003 at 05:17 UTC
    Ah - well - the correction to your typo presents an explatnation not addressed yet, for the apparently anamolos behaviour. The "greater-than" symbol in the OPEN statement will be treated as an output redirect by the command prompt, even if it is inside quotes. To avoid that, it needs to be preceded by the caret (^). So, to run the open statement at the command line the way you want, you will need to enter it as:
    open (LOGFILE, "^>$logfile") or die "Can't open $logfile: $!";
    (Notice the tiny little "^" symbol after the first quote mark)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2024-04-26 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found