perl contribution

R

robin

I do have a contrubution it's called:
#!/usr/bin/perl
my $c=0; my @key;
my $key;
foreach ( sort %ENV)
{
$key= join ("=", %ENV);
@key = split (/=/, $key);
print "key=$key[$c]\n\n";
print "value=$key[$c+1]\n\n---";
++$c;
}
 
A

A. Sinan Unur

I do have a contrubution it's called:
#!/usr/bin/perl
my $c=0; my @key;
my $key;
foreach ( sort %ENV)
{
$key= join ("=", %ENV);
@key = split (/=/, $key);
print "key=$key[$c]\n\n";
print "value=$key[$c+1]\n\n---";
++$c;
}

What is it supposed to do?

Sinan
 
J

Jay Tilton

: I do have a contrubution

To what are you contributing?

: #!/usr/bin/perl
: my $c=0; my @key;
: my $key;
: foreach ( sort %ENV)

What on Earth are you doing that for?

: {
: $key= join ("=", %ENV);
: @key = split (/=/, $key);

You can't be serious.

: print "key=$key[$c]\n\n";
: print "value=$key[$c+1]\n\n---";
: ++$c;
: }

I'm dying here. On top of adding absurd convolutions to a trivial task,
your program outputs incorrect information.

print "key=$_\nvalue=$foo{$_}\n\n" for keys %foo;
 
J

John Bokma

Jay said:
: I do have a contrubution

To what are you contributing?

: #!/usr/bin/perl
: my $c=0; my @key;
: my $key;
: foreach ( sort %ENV)

What on Earth are you doing that for?

Greenhouse effect?
 
C

Chris Mattern

robin said:
foreach ( sort %ENV)

Sigh. Robin, do you realize...

No. No, you don't. Robin, this statement
takes the variable names and values in your
environment and sorts them without regard
for which is which. Once you sort %ENV,
you have lost which variables have which
values--or even which strings are variables
and which values.

--
Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
 
J

John Bokma

Eric said:
I thought that that was primarily due to carbon dioxide rather than
methane.

I vaguely remember that a lot of methane also has a bad effect on %ENV.
 
S

Sherm Pendley

Josef said:
You mean he took something from the greenhouse and smoked it?

That wears off after a while. Robin's condition appears to be permanent.

sherm--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top