Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > perl contribution

Reply
Thread Tools

perl contribution

 
 
robin
Guest
Posts: n/a
 
      03-10-2005
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;
}

 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      03-10-2005
"robin" <(E-Mail Removed)> wrote in news:1110413178.514261.222330
@o13g2000cwo.googlegroups.com:

> 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
 
Reply With Quote
 
 
 
 
Jay Tilton
Guest
Posts: n/a
 
      03-10-2005
"robin" <(E-Mail Removed)> wrote:

: 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;

 
Reply With Quote
 
John Bokma
Guest
Posts: n/a
 
      03-10-2005
Jay Tilton wrote:

> "robin" <(E-Mail Removed)> wrote:
>
> : 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?

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html

 
Reply With Quote
 
Josef Moellers
Guest
Posts: n/a
 
      03-10-2005
John Bokma wrote:
> Jay Tilton wrote:
>
>
>>"robin" <(E-Mail Removed)> wrote:
>>
>>: 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?
>


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

--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett

 
Reply With Quote
 
Chris Mattern
Guest
Posts: n/a
 
      03-10-2005
robin wrote:

> 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?"
 
Reply With Quote
 
Eric Bohlman
Guest
Posts: n/a
 
      03-10-2005
John Bokma <(E-Mail Removed)> wrote in
news:Xns9614DFF5DC3F2castleamber@130.133.1.4:

> Jay Tilton wrote:
>
>> "robin" <(E-Mail Removed)> wrote:
>>
>> : 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?


I thought that that was primarily due to carbon dioxide rather than
methane.
 
Reply With Quote
 
John Bokma
Guest
Posts: n/a
 
      03-11-2005
Josef Moellers wrote:

> John Bokma wrote:
>> Jay Tilton wrote:
>>
>>
>>>"robin" <(E-Mail Removed)> wrote:
>>>
>>>: 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?

>
> You mean he took something from the greenhouse and smoked it?


Nah, he was messing with the ENVironment .

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html

 
Reply With Quote
 
John Bokma
Guest
Posts: n/a
 
      03-11-2005
Eric Bohlman wrote:

> John Bokma <(E-Mail Removed)> wrote in
> news:Xns9614DFF5DC3F2castleamber@130.133.1.4:
>
>> Jay Tilton wrote:
>>
>>> "robin" <(E-Mail Removed)> wrote:
>>>
>>> : 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?

>
> 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.

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html

 
Reply With Quote
 
Sherm Pendley
Guest
Posts: n/a
 
      03-11-2005
Josef Moellers wrote:

> 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--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Samsung's latest contribution to P&S mediocrity Rich Digital Photography 6 09-03-2009 01:35 PM
eric4 request for contribution Detlev Offenbach Python 0 01-12-2008 01:34 PM
eric4 request for contribution Detlev Offenbach Python 0 01-12-2008 08:50 AM
My humble contribution - wrapper script for dcraw (linux) bizcotti@gmail.com Digital Photography 1 04-01-2007 01:57 AM
A Tree class, my $0.02 contribution to the python community. Antoon Pardon Python 7 10-16-2005 09:19 PM



Advertisments