Blog
Developers
Careers
Support
Contact
Gossamer Threads
Solutions
Results
About
Mailing Lists
Resource Centre
Forum
Tools
Home
Who's Online
Tags
Favourites
Login
Forum Search
(
Advanced Search
)
This forum
This category
All forums
for
Home
:
General
:
Perl Programming
:
what is || in variable declaration
Previous Thread
Next Thread
Print Thread
View Threaded
Dec 1, 2017, 8:42 AM
delicia
Enthusiast
(661 posts)
Dec 1, 2017, 8:42 AM
Post #1 of 2
Views: 3639
Shortcut
what is || in variable declaration
what does the following mean?
Code:
my ($server_auth) = $ENV{'REMOTE_USER'} || $ENV{'AUTH_USER'};
Dec 1, 2017, 11:03 PM
Andy
Veteran
/ Moderator
(18441 posts)
Dec 1, 2017, 11:03 PM
Post #2 of 2
Views: 3562
Shortcut
Re: [delicia] what is || in variable declaration
In reply to
Hi,
That basically tells
$server_auth
to either get the value of
$ENV{'REMOTE_USER'}
OR (if $ENV{'REMOTE_USER'} doesn't exist), look for
$ENV{'AUTH_USER'}
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my
Amazon Wish List
GLinks ULTRA Package
|
GLinks ULTRA Package PRO
Links SQL Plugins
|
Website Design and SEO
|
UltraNerds
|
ULTRAGLobals Plugin
|
Pre-Made Template Sets
|
FREE GLinks Plugins!
Previous Thread
Next Thread
Print Thread
View Threaded