In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Rafal Pocztarski)
wrote:
> Are you serious? (excuse my ignorance, I've never used Mac) Does it mean
> no one-liners? No filters?? No piped filters??? No piped one-line
> filters
Classic MacOS doesn't have such things as pipes, although OS X
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Rafal Pocztarski)
wrote:
> >
> > Couldn't seem to locate it (using MacPerl) unfortunately. There is a few
> > pods that came with it, but mostly I'm using The Perl CD Bookshelf by
> > O'reilly & Associates for reference. It's on my PC system
"Brett W. McCoy" wrote:
>
> On Thu, 25 Oct 2001, RaFaL Pocztarski wrote:
>
> > You can always use http://www.perldoc.com/ but it's hard to believe that
> > any version of perl comes without perldoc, however I don't know MacPerl
> > at all. Try to find any info about perldoc in MacPerl docs or we
Shannon Murdoch wrote:
> >> foreach (sort keys %params) { print "\t$params{$_}" }
> >
> > The same way. $_ is the key for the hash element in the while loop.
>
> I want a list of keys, not their values though.
You have it already in your code:
sort keys %params
is a sorted list of keys in
I was originally going to write all the values that a form submitted to a
text file, delimited by tabs and Carriage Returned, ready for the next
submission. Now I've changed the structure of the site so that the valid
keys to the submitted data are written to a file as the form is created
online
Brett W. McCoy)
> Newsgroups: perl.beginners.cgi
> Date: Thu, 25 Oct 2001 17:02:29 -0400 (EDT)
> To: Shannon Murdoch <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Subject: Re: Printing Hash Keys
>
> Why do you need to? There is way by using the Tie::IxHash module
On Thu, 25 Oct 2001, RaFaL Pocztarski wrote:
> You can always use http://www.perldoc.com/ but it's hard to believe that
> any version of perl comes without perldoc, however I don't know MacPerl
> at all. Try to find any info about perldoc in MacPerl docs or website.
Yeah, but recall that Macs (p
On Thu, 25 Oct 2001, Shannon Murdoch wrote:
> So I take it there is no way to list all the keys contained in a hash in the
> same order they were entered in, like I can with a normal array?
Why do you need to? There is way by using the Tie::IxHash module. It is
available from CPAN (if you have
Shannon Murdoch wrote:
>
> Couldn't seem to locate it (using MacPerl) unfortunately. There is a few
> pods that came with it, but mostly I'm using The Perl CD Bookshelf by
> O'reilly & Associates for reference. It's on my PC system when I need it
> though.
You can always use http://www.perldoc
> -Original Message-
> From: Shannon Murdoch [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 25, 2001 9:35 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Printing Hash Keys
>
>
> Couldn't seem to locate it (using MacPerl) unfortunately.
> There is a f
Couldn't seem to locate it (using MacPerl) unfortunately. There is a few
pods that came with it, but mostly I'm using The Perl CD Bookshelf by
O'reilly & Associates for reference. It's on my PC system when I need it
though.
>> ... Perldoc (found out I can only use it under Windows, which
>> I
> -Original Message-
> From: Shannon Murdoch [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 25, 2001 5:51 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Printing Hash Keys
>
>
> ... Perldoc (found out I can only use it under Windows, which
> I have
At 19:51 25/10/01 +1000, Shannon Murdoch wrote:
> So I take it there is no way to list all the keys contained in a hash in
> the same order they were entered in, like I can with a normal array?
use Tie::IxHash;
It makes hash functions return elements in insertion order, IIRC.
--
mjx
free love
x27;t know enough about the CGI.pm's internal workings I guess.
-Shannon
> From: "Bradford Ritchie" <[EMAIL PROTECTED]>
> Date: Wed, 24 Oct 2001 20:03:34 -0400
> To: "Shannon Murdoch" <[EMAIL PROTECTED]>
> Subject: Re: Printing Hash Keys
>
>
array?
-Shannon
> From: [EMAIL PROTECTED] (Rafal Pocztarski)
> Newsgroups: perl.beginners.cgi
> Date: Wed, 24 Oct 2001 16:04:19 +0200
> To: [EMAIL PROTECTED]
> Subject: Re: Printing Hash Keys
>
> Shannon Murdoch wrote:
>>
>> What everyone has said so far is ways to lis
...
@seq = qw(dirt sand land air wind breath);
foreach (@seq) {
print $param{$_} . "\n";
}
is one way ...
-Original Message-
From: Shannon Murdoch [mailto:[EMAIL PROTECTED]]
Sent: October 24, 2001 19:01
To: [EMAIL PROTECTED]
Subject: Re: Printing Hash Keys
Th
CTED] (Rafal Pocztarski)
> Newsgroups: perl.beginners.cgi
> Date: Wed, 24 Oct 2001 16:04:19 +0200
> To: [EMAIL PROTECTED]
> Subject: Re: Printing Hash Keys
>
> Shannon Murdoch wrote:
>>
>> What everyone has said so far is ways to list all the VALUES contained in a
9:57:09 -0400 (EDT)
> To: Shannon Murdoch <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Subject: Re: Printing Hash Keys
>
> On Wed, 24 Oct 2001, Shannon Murdoch wrote:
>
>>>> foreach (sort keys %params) { print "\t$params{$_}" }
>>>
>&
At 23:26 24/10/01 +1000, Shannon Murdoch wrote:
> What everyone has said so far is ways to list all the VALUES contained
> in a hash array, what I need to do is list all the KEYS contained in the
> hash array-with a tab (\t) between each.
foreach (keys %params) { print "$_\t"; }
should work
--
Shannon Murdoch wrote:
>
> What everyone has said so far is ways to list all the VALUES contained in a
> hash array, what I need to do is list all the KEYS contained in the hash
> array-with a tab (\t) between each.
print join "\t", sort keys %hashname;
- RaFaL Pocztarski, [EMAIL PROTECTED]
--
On Wed, 24 Oct 2001, Shannon Murdoch wrote:
> What everyone has said so far is ways to list all the VALUES contained in a
> hash array, what I need to do is list all the KEYS contained in the hash
> array-with a tab (\t) between each.
Read the perldoc on the keys function. It takes all of the k
On Wed, 24 Oct 2001, Shannon Murdoch wrote:
> >> foreach (sort keys %params) { print "\t$params{$_}" }
> >
> > The same way. $_ is the key for the hash element in the while loop.
>
>
> I want a list of keys, not their values though.
Right -- the 'keys' function extracts the list of keys from a
Reply-To: [EMAIL PROTECTED]
> Newsgroups: perl.beginners.cgi
> Date: Wed, 24 Oct 2001 08:15:12 -0400
> To: Shannon Murdoch <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: Printing Hash Keys
>
> Shannon Murdoch wrote:
>>
>>> From: [EMAIL PROTE
Shannon Murdoch wrote:
>
> > From: [EMAIL PROTECTED] (Brett W. McCoy)
> >
> > On Wed, 24 Oct 2001, Shannon Murdoch wrote:
> >
> >> I know how to print the contents of a hash, but what if I wanted to print
> >> the keys themselves that the hash is called from (delimited by tabs)?
> >>
> >> This is
> From: [EMAIL PROTECTED] (Brett W. McCoy)
>
> On Wed, 24 Oct 2001, Shannon Murdoch wrote:
>
>> I know how to print the contents of a hash, but what if I wanted to print
>> the keys themselves that the hash is called from (delimited by tabs)?
>>
>> This is how I print the contents of a hash (Th
On Wed, 24 Oct 2001, Shannon Murdoch wrote:
> I know how to print the contents of a hash, but what if I wanted to print
> the keys themselves that the hash is called from (delimited by tabs)?
>
> This is how I print the contents of a hash (Thanks to Brett W. McCoy):
>
> %params = qw(
> i01 4
> i0
26 matches
Mail list logo