[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-win32-users
Subject: Re: Perl Language / Syntax Question
From: "Mark Pryor" <mpryor () sprintmail ! com>
Date: 2002-12-30 16:07:55
[Download RAW message or body]
Hi Dan,
----- Original Message -----
From: "Dan Rybij" <dan@magicalone.com>
To: <perl-win32-users@listserv.activestate.com>
Sent: Monday, December 30, 2002 7:54 AM
Subject: Perl Language / Syntax Question
> Hi All!
>
> How come I can:
>
> $thing = ( 4, 5, 6 )[1];
>
> But I can't:
>
> $thing = ( one => 7, two => 8, three => 9 ){two};
# Get it from an anonymous hash
$thing = { one => 7, two => 8, three => 9 } -> {two};
regards,
Mark Pryor
>
> ????
>
> Thanks!!
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT size=2></FONT>Hi Dan,</DIV>
<DIV>----- Original Message -----
<DIV>From: "Dan Rybij" <<A
href="mailto:dan@magicalone.com">dan@magicalone.com</A>></DIV>
<DIV>To: <<A
href="mailto:perl-win32-users@listserv.activestate.com">perl-win32-users@listserv.activestate.com</A>></DIV>
<DIV>Sent: Monday, December 30, 2002 7:54 AM</DIV>
<DIV>Subject: Perl Language / Syntax Question</DIV></DIV><FONT size=2>
<DIV><BR></FONT><FONT size=3>> Hi All!<BR>> <BR>> How come I
can:<BR>> <BR>> $thing = ( 4, 5, 6 )[1];<BR>> <BR>> But I
can't:<BR>> <BR>> $thing = ( one => 7, two => 8, three => 9
){two};<BR><BR># Get it from an anonymous hash<BR>$thing = { one => 7,
two => 8, three => 9 } -> {two};<BR><BR>regards,</FONT></DIV>
<DIV><FONT size=3>Mark Pryor<BR>> <BR>> ????<BR>> <BR>>
Thanks!!<BR></DIV></FONT></BODY></HTML>
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic