Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Question about || (was REGEXP removing - il- - -b-f and - il- - - - f)
> also
> "or die" is more preferable than "|| die"

Why is that? :) I was actually going to post a question about ambiguity
syntax later, but here it is anyway. Are the following 4 equivalent?

1)
if ($b) {
$a = $b;
}
else {
$a = $c;
}

2)
$a = $b or $c;

3)
$a = $b || $c;

4)
$a = $b ? $b : $c;


Also there was an example on the web that completely threw me off. Although
this works:

local ($/);

,I have no idea how it undefs $/. Points to a good reading on the
subject are equally appreciated.

Thanks

Peter



Report this thread to moderator Post Follow-up to this message
Old Post
Peter Rabbitson
04-27-05 08:56 PM


Re: Question about || (was REGEXP removing - il- - -b-f and - il- - - - f)
On Wed, Apr 27, 2005 at 09:06:39AM -0500, Peter Rabbitson wrote:
> Also there was an example on the web that completely threw me off. Althoug
h
> this works:
>
> local ($/);
>

Sorry about this last one, I undrestand the idea of local for globs, I just
thought that

local $/;
and
local ($/);
differ. While reading your answers I realised that it's the same as saying:
my ($a); which is equivalent to my $a; It is pretty weird to have equivalent
operators ( 'or' / '||' ) with different precedence. I guess this is where
TIMTOWTDI bites back really bad... learning something new every day :)

Report this thread to moderator Post Follow-up to this message
Old Post
Peter Rabbitson
04-27-05 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:30 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.