CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
A syntax I have not encountered before

 



pomalley
New User

Sep 19, 2016, 1:46 PM

Post #1 of 2 (2157 views)
A syntax I have not encountered before Can't Post

Hello everyone!

Can someone help me with the following syntax:

$adgroups{$group}->{OWNER} = $1;
$g2o{$1}->{$group}++;

How would I read this?

Thanks...


Laurent_R
Veteran / Moderator

Sep 19, 2016, 2:58 PM

Post #2 of 2 (2156 views)
Re: [pomalley] A syntax I have not encountered before [In reply to] Can't Post

Very difficult to say without a wider code context.

$1 is a capture in a regex somewhere before in your code.

The rest is just assigning this capture to a data structure item and incrementing some counter related to this capture.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives