[23352] in Perl-Users-Digest
Perl-Users Digest, Issue: 5571 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 26 18:05:43 2003
Date: Fri, 26 Sep 2003 15:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 26 Sep 2003 Volume: 10 Number: 5571
Today's topics:
Re: 1) How to debug CGI.pm cookies 2) Template.pm with <wwonko@rdwarf.com>
Re: choose from duplicate hash keys <mpapec@yahoo.com>
Re: choose from duplicate hash keys <phddas@yahoo.com>
Re: choose from duplicate hash keys <phddas@yahoo.com>
Re: dim (Anno Siegel)
Re: dim <nobody@bogus.com>
Explaining how a (Mind) program works (Arthur T. Murray)
Re: Find what is in array1 and not in array2 <kiel@knss.net>
Re: Find what is in array1 and not in array2 <postmaster@castleamber.com.invalid>
Re: Is there a quick way to check if a scalar contains <usenet@dwall.fastmail.fm>
Net-Telnet-Cisco module (Prashant Varghese)
Re: Net-Telnet-Cisco module <postmaster@castleamber.com.invalid>
Re: Net-Telnet-Cisco module <wwonko@rdwarf.com>
Re: Net-Telnet-Cisco module <ddunham@redwood.taos.com>
Re: Net-Telnet-Cisco module <postmaster@castleamber.com.invalid>
Re: Net-Telnet-Cisco module <uri@stemsystems.com>
Re: packages <bart.lateur@pandora.be>
Re: Someone abusing moderator priveledge? <syscjm@gwu.edu>
Re: Split variable into fields ? <raisin@delete-this-trash.mts.net>
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 26 Sep 2003 20:24:23 +0000 (UTC)
From: Louis Erickson <wwonko@rdwarf.com>
Subject: Re: 1) How to debug CGI.pm cookies 2) Template.pm with CGI.pm
Message-Id: <bl279n$8os$1@holly.rdwarf.com>
Mr I <konny@waitrose.com> wrote:
: Took my own advice :(
Why is it so sad that you solved your problem?
: 2) Template.pm with CGI.pm
: original post stated problem / solution. Stopped passing the complex
: data structure CGI and send just the value name pair using CGI's Vars()
: as stated in perldoc CGI in section "FETCHING THE PARAMETER LIST AS A HASH:"
I tend to have a section in my templates that's just a string called
"deubgstr" or something, that if it exists, is emitted inside <pre> tags.
Then, when I have to know what's going on, I tend to set it there, and
it turns up in the output where the template puts it.
For CGI and cookies, look in to Data::Dumper. Just use that on the CGI
object, and you'll get it's internal variables, which are reasonably clear.
Dumper()-ing the output of Vars might be clearer.
I guess I wouldn't have expected a way to diagnose these other than to
output them somehow, and because there are so many ways to output, I
wouldn't have expected a standard way.
Glad to hear you're unstuck.
--
Louis Erickson - wwonko@rdwarf.com - http://www.rdwarf.com/~wwonko/
What use is magic if it can't save a unicorn?
-- Peter S. Beagle, "The Last Unicorn"
------------------------------
Date: Fri, 26 Sep 2003 21:31:42 +0200
From: Matija Papec <mpapec@yahoo.com>
Subject: Re: choose from duplicate hash keys
Message-Id: <4n49nvg23ugnoscdqc1vtman50gak7cgai@4ax.com>
X-Ftn-To: JohnWalter
JohnWalter <phddas@yahoo.com> wrote:
>*****************here is my best brain dump so far *****************
ok.
>my (%table, %duple);
>open DATA, $from_file or die $!;
>
>while (<DATA>) {
> my ($key, @value) = split;
> push @{ $table{$key} }, [ @value ];
> $duple{$key}++;
You don't really need %duple as you can read number of duplicates directly
from $#{$table{$k}} as you wrote below.
>for my $k (keys %duple) {
> if ($duple{$k} > 1) {
> for my $i ( 0 .. $#{$table{$k}} ) {
> print $i+1, ": ", $k, " ", $table{$k}[$i], "\n"; #prints
>ARRAY(0x8300a44) but needed is the actual array values. why not when it
>is derefrenced correclty?
It isn't, check the code below.
> }
> print "please enter the line number to keep\n";
> chomp ( my $keep = <STDIN> );
> #delete the rest of the lines from the file.squezzing my brain a
>bit harder
I've assumed you want to keep all non duplicate lines; also notice that
lines which we want to keep are not necessarily in same order as in $file,
use strict;
my %table;
#open DATA, $from_file or die $!;
while (<DATA>) {
my ($key, @value) = split;
push @{ $table{$key} }, [ @value ];
}
for my $k (keys %table) {
my $tnum = $#{ $table{$k} };
my $keep = 0;
if ($tnum > 0) {
for my $i (0 .. $tnum) {
print $i+1, ": ", $k, " ", (join ' ', @{$table{$k}[$i]}), "\n";
}
print "please enter the line number to keep\n";
chomp ( $keep = <STDIN> );
$keep--;
}
print "Keeping line: $k ", (join ' ', @{$table{$k}[$keep]}), "\n"
}
__DATA__
a1 1 2 6
a2 8 7 4
a2 7 8 0
a3 0 0 2
b4 8 99 8
b4 0 0 0
b4 0 0 1
c7 6 5 3
--
Matija
------------------------------
Date: Sat, 27 Sep 2003 07:54:15 +1000
From: JohnWalter <phddas@yahoo.com>
Subject: Re: choose from duplicate hash keys
Message-Id: <3F74B587.6080001@yahoo.com>
Matija Papec wrote:
> X-Ftn-To: JohnWalter
>
> JohnWalter <phddas@yahoo.com> wrote:
>
>>*****************here is my best brain dump so far *****************
>
>
> ok.
>
>
>>my (%table, %duple);
>>open DATA, $from_file or die $!;
>>
>>while (<DATA>) {
>> my ($key, @value) = split;
>> push @{ $table{$key} }, [ @value ];
>> $duple{$key}++;
>
>
> You don't really need %duple as you can read number of duplicates directly
> from $#{$table{$k}} as you wrote below.
>
$#{$tble{$k}} has the number of refrenced arrays [@value] and it does
not have the number of duplicated keys.
>
>>for my $k (keys %duple) {
>> if ($duple{$k} > 1) {
>> for my $i ( 0 .. $#{$table{$k}} ) {
>> print $i+1, ": ", $k, " ", $table{$k}[$i], "\n"; #prints
>>ARRAY(0x8300a44) but needed is the actual array values. why not when it
>>is derefrenced correclty?
>
>
> It isn't, check the code below.
>
>
>> }
>> print "please enter the line number to keep\n";
>> chomp ( my $keep = <STDIN> );
>> #delete the rest of the lines from the file.squezzing my brain a
>>bit harder
>
>
> I've assumed you want to keep all non duplicate lines; also notice that
> lines which we want to keep are not necessarily in same order as in $file,
>
>
what I need is
1: a2 8 7 4
2: a2 7 8 0
please enter the line number to keep:
then if I choose 2, the code needs to delete all the other lines "in
this case line 1 with the values a2 8 7 4 from the file being handled.
1: b4 8 99 8
2: b4 0 0 0
3: b4 0 0 1
please enter the line number to keep:
then if I choose 1, the code needs to delete all the other lines from
the file and keep b4 8 99 8
> use strict;
>
> my %table;
> #open DATA, $from_file or die $!;
> while (<DATA>) {
> my ($key, @value) = split;
> push @{ $table{$key} }, [ @value ];
> }
>
> for my $k (keys %table) {
> my $tnum = $#{ $table{$k} };
> my $keep = 0;
>
> if ($tnum > 0) {
> for my $i (0 .. $tnum) {
> print $i+1, ": ", $k, " ", (join ' ', @{$table{$k}[$i]}), "\n";
> }
> print "please enter the line number to keep\n";
> chomp ( $keep = <STDIN> );
> $keep--;
> }
> print "Keeping line: $k ", (join ' ', @{$table{$k}[$keep]}), "\n"
> }
the last line of this code prints the whole file again which is not
helpful with a file of thousands of lines.
> __DATA__
> a1 1 2 6
> a2 8 7 4
> a2 7 8 0
> a3 0 0 2
> b4 8 99 8
> b4 0 0 0
> b4 0 0 1
> c7 6 5 3
>
>
------------------------------
Date: Sat, 27 Sep 2003 08:03:53 +1000
From: JohnWalter <phddas@yahoo.com>
Subject: Re: choose from duplicate hash keys
Message-Id: <3F74B7C9.3010302@yahoo.com>
JohnWalter wrote:
> Matija Papec wrote:
>
>> X-Ftn-To: JohnWalter
>> JohnWalter <phddas@yahoo.com> wrote:
>>
>>> *****************here is my best brain dump so far *****************
>>
>>
>>
>> ok.
>>
>>
>>> my (%table, %duple);
>>> open DATA, $from_file or die $!;
>>>
>>> while (<DATA>) {
>>> my ($key, @value) = split;
>>> push @{ $table{$key} }, [ @value ];
>>> $duple{$key}++;
>>
>>
>>
>> You don't really need %duple as you can read number of duplicates
>> directly
>> from $#{$table{$k}} as you wrote below.
>>
>
> $#{$tble{$k}} has the number of refrenced arrays [@value] and it does
> not have the number of duplicated keys.
>
I take that back, appearantly, if it has more than one [ @value ] it
must also have the same key.
>>
>>> for my $k (keys %duple) {
>>> if ($duple{$k} > 1) {
>>> for my $i ( 0 .. $#{$table{$k}} ) {
>>> print $i+1, ": ", $k, " ", $table{$k}[$i], "\n"; #prints
>>> ARRAY(0x8300a44) but needed is the actual array values. why not when
>>> it is derefrenced correclty?
>>
>>
>>
>> It isn't, check the code below.
>>
>>
>>> }
>>> print "please enter the line number to keep\n";
>>> chomp ( my $keep = <STDIN> );
>>> #delete the rest of the lines from the file.squezzing my brain a
>>> bit harder
>>
>>
>>
>> I've assumed you want to keep all non duplicate lines; also notice that
>> lines which we want to keep are not necessarily in same order as in
>> $file,
>>
>>
>
> what I need is
> 1: a2 8 7 4
> 2: a2 7 8 0
> please enter the line number to keep:
> then if I choose 2, the code needs to delete all the other lines "in
> this case line 1 with the values a2 8 7 4 from the file being handled.
>
> 1: b4 8 99 8
> 2: b4 0 0 0
> 3: b4 0 0 1
> please enter the line number to keep:
> then if I choose 1, the code needs to delete all the other lines from
> the file and keep b4 8 99 8
>
>
>> use strict;
>>
>> my %table;
>> #open DATA, $from_file or die $!;
>> while (<DATA>) {
>> my ($key, @value) = split;
>> push @{ $table{$key} }, [ @value ];
>> }
>>
>> for my $k (keys %table) {
>> my $tnum = $#{ $table{$k} };
>> my $keep = 0;
>>
>> if ($tnum > 0) {
>> for my $i (0 .. $tnum) {
>> print $i+1, ": ", $k, " ", (join ' ', @{$table{$k}[$i]}), "\n";
>> }
>> print "please enter the line number to keep\n";
>> chomp ( $keep = <STDIN> );
>> $keep--;
>> }
>> print "Keeping line: $k ", (join ' ', @{$table{$k}[$keep]}), "\n"
>> }
>
>
> the last line of this code prints the whole file again which is not
> helpful with a file of thousands of lines.
>
so I just deleted that print line.
which line of this code deletes the non-selected lines. I tried the code
but still ends up with the unwanted 'not selected' data lines.
>
>> __DATA__
>> a1 1 2 6
>> a2 8 7 4
>> a2 7 8 0
>> a3 0 0 2
>> b4 8 99 8
>> b4 0 0 0
>> b4 0 0 1
>> c7 6 5 3
>>
>>
>
>
------------------------------
Date: 26 Sep 2003 18:27:43 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: dim
Message-Id: <bl20ev$k2u$1@mamenchi.zrz.TU-Berlin.DE>
Abigail <abigail@abigail.nl> wrote in comp.lang.perl.misc:
[...]
> Or:
>
> system grep => $_ => '/var/adm/syslog' for @greplist;
I'd use egrep, if the sequence isn't important. But I'm off topic.
> Abigail
> --
> A perl rose: perl -e '@}>-`-,-`-%-'
Very pretty, very prickly. Perl warns about it a lot.
Anno
------------------------------
Date: Fri, 26 Sep 2003 15:07:28 -0500
From: Peter Ensch <nobody@bogus.com>
Subject: Re: dim
Message-Id: <bl26a0$s4c$1@home.itg.ti.com>
Abigail wrote:
> rab (richardbriggs@att.com) wrote on MMMDCLXXVIII September MCMXCIII in
> <URL:news:900b7105.0309260845.1f0b7895@posting.google.com>:
> .. is this the best way to grep a HUMONGUS file (>3000000 lines) for a
> .. list of matching words within a perlscript?
> ..
> .. (the file is too big to load into an array)
> ..
> .. ------------------------------------------------------
> .. my @greplist=qw( var full error over repeats no_space );
> .. my @all;
> ..
> .. foreach (@greplist){
> .. my @finds = `/usr/bin/grep $_ /var/adm/syslog`;
> .. push(@all,@finds);
> .. }
> ..
> .. print @all;
>
>
> All you want is printing out the matches?
>
>
> foreach (@greplist) {
> open my $fh => "grep $_ /var/adm/syslog |" or die;
> print while <$fh>;
> close $fh or die;
> }
>
> Or:
>
> system grep => $_ => '/var/adm/syslog' for @greplist;
>
>
> Abigail
Or do it in one pass:
local $" = '|';
open my $fh => "egrep '@greplist' /var/adm/syslog |" or die;
print while <$fh>;
close $fh or die;
or
system "egrep '@list' /var/adm/syslog";
Peter
--
^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
Peter Ensch,
pensch@ti.com A-1140 (214) 480 2333
^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
------------------------------
Date: 26 Sep 2003 11:39:19 -0800
From: uj797@victoria.tc.ca (Arthur T. Murray)
Subject: Explaining how a (Mind) program works
Message-Id: <3f7487d7@news.victoria.tc.ca>
"Bill Modlin" <modlin1@metrocast.net> wrote on Fri, 26 Sep 2003:
<snip>
>>> If I wanted to explain how one of my programs worked
>>> I would not give someone a print out of the code.
>>> First I would explain it in higher level (folk psychology?)
>>> terms and then explain how I embodied these ideas in actual code.
>> I'm not sure why - especially if the person you're explaining it to
>> is a programmer and knows the language.
BM:
> For the same reason that all good programs are liberally annotated
> with comments. Programming languages are for controlling computers,
> not for communicating with people. It is laborious and error prone
> to attempt to discover the purpose of an algorithm implemented by
> a bit of code just by inspecting that code.
ATM:
Nevertheless the original source code has to be made available, e.g.
http://www.scn.org/~mentifex/jsaimind.html -- AI Mind in JavaScript;
http://mentifex.virtualentity.com/mind4th.html -- Mind.Forth PD AI.
BM:
> This is true even for the original author of the code.
> Code that seemed crystal clear and obvious at the time
> you wrote it is often indecipherable when a year later
> you are called upon to adjust or fix it in some fashion.
ATM:
The factoring of Forth and the hierarchy of objects help here,
plus liberal comments and statements at the end of each Mind-
Module explaining to what other Module program-flow returns:
http://mentifex.virtualentity.com/progman.html -- Modules.
BM:
> Of course, the extensional function of each line of code is obvious
> to anyone who knows the language. There is no mystery in a line of
> code that says to increment the value of some variable by two:
> it says exactly what is to happen. [...]
> Literal quoting of code is sometimes a useful adjunct to understanding
> of function. We all generally like to have actual source to work with.
Yes, and so the AI4U (AI For Your) textbook of artificial intelligence at
http://search.barnesandnoble.com/bookSearch/isbnInquiry.asp?ISBN=0595259227
contains a full source-code listing of the AI Mind-1.1 in MSIE JavaScript.
On September 24, 2003, a rather mean-spirited reviewer at B&N, hiding
behind anonymity, complained that "This book is not really a textbook
because it explains nothing. It rather is a collection of 'modules'
which the author expects the reader to implement" -- without pointing out
that the AI Mind modules are already implemented at the end of the book.
Now this author is indeed trying to get Minds coded in XYZ languages:
http://mentifex.virtualentity.com/cpp.html -- C++ with new AI code;
http://mentifex.virtualentity.com/java.html -- see Mind.JAVA #1 & #2;
http://mentifex.virtualentity.com/lisp.html -- Lisp AI Weblog;
http://mentifex.virtualentity.com/perl.html -- first Perl module;
http://mentifex.virtualentity.com/prolog.html -- Prolog AI Weblog;
http://mentifex.virtualentity.com/python.html -- Python AI Weblog;
http://mentifex.virtualentity.com/ruby.html -- Ruby AI Blog (OO AI);
http://mentifex.virtualentity.com/scheme.html -- Scheme AI Weblog;
http://mentifex.virtualentity.com/vb.html -- see "Mind.VB #001" link.
BM:
> But it is only an adjunct: the necessary ingredient for understanding
> of non-trivial function is explanation of the principles of operation
> in human-interpretable language.
ATM:
I have created every conceivable instrument of explaining the AI Mind.
http://mentifex.virtualentity.com/acm.html is Steps to DIY AI.
http://mentifex.virtualentity.com/standard.html -- AI Standards.
http://mentifex.virtualentity.com/variable.html -- AI Variables.
BM:
> Given the code one may never understand what it is for.
ATM:
Recently I have been meeting in person with an incognito engineer
who has volunteered to attempt to translate (port) Mind.Forth into
http://mentifex.virtualentity.com/aicppsrc.html AI C++ Source Code.
BM:
> Given an understandable explanation of just what is to be done
ATM:
Nothing beats having a one-on-one interactive discussion of
what is to be done to code AI and how to do it. That optimal
option is why I have a dreamworld fantasy of hiring out to CS
departments and AI labs to have my primitive but AI-coding
brain picked clean and dry of any contribution I make to AI.
> and how to do it, any programmer can produce new code
> for a function readily enough: having an actual worked out
> version to go by is a dispensable luxury. [...]
A.T. Murray
--
http://mentifex.virtualentity.com/perl.html -- Perl AI Mind Weblog
http://www.amazon.com/exec/obidos/ASIN/0595654371/ -- AI Textbook;
http://www.sl4.org/archive/0205/3829.html -- Goertzel on Mentifex;
http://doi.acm.org/10.1145/307824.307853 -- ACM SIGPLAN Mind.Forth
------------------------------
Date: 27 Sep 2003 05:15:34 +1000
From: "Kiel R Stirling" <kiel@knss.net>
Subject: Re: Find what is in array1 and not in array2
Message-Id: <3f749056$1@nexus.comcen.com.au>
John Bokma <postmaster@castleamber.com.invalid> wrote:
>The Poor wrote:
>
>> But it is not what I need. I need to find what in array1, but not in
>> array2. Can anyone show me how to do that?
>
>my %hash;
>@hash2{ @array2 } = ();
>
>my @notin2;
>
>foreach my $el (@array1) {
>
> push(@notin2, $el) unless exists $hash2{$el}; # O(1) look up
>}
>
>running time is O(max(n,m))
>
>--
>Kind regards, virtual home: http://johnbokma.com/ ICQ: 218175426
> web site hints: http://johnbokma.com/websitedesign/
>John I count my toes ~ one to ten ~ I meditate ~ and feel the Zen
>
Why not use grep ??
#!/usr/bin/perl -w
use strict;
my @a = qw(1 2 3 4);
my @b = qw(2 4);
foreach my $v (@a) {
print $v unless grep /^$v$/, @b;
}
-Kiel R Stirling
------------------------------
Date: Fri, 26 Sep 2003 21:15:43 +0200
From: John Bokma <postmaster@castleamber.com.invalid>
Subject: Re: Find what is in array1 and not in array2
Message-Id: <1064603871.167498@halkan.kabelfoon.nl>
Kiel R Stirling wrote:
> John Bokma <postmaster@castleamber.com.invalid> wrote:
[snip code]
>>running time is O(max(n,m))
>
> Why not use grep ??
Because the running time will be O(n x m)
--
Kind regards, virtual home: http://johnbokma.com/ ICQ: 218175426
web site hints: http://johnbokma.com/websitedesign/
John I count my toes ~ one to ten ~ I meditate ~ and feel the Zen
------------------------------
Date: Fri, 26 Sep 2003 18:07:08 -0000
From: "David K. Wall" <usenet@dwall.fastmail.fm>
Subject: Re: Is there a quick way to check if a scalar contains non-alpha-numeric characters?
Message-Id: <Xns94028F8D6ECC9dkwwashere@216.168.3.30>
Jeff 'japhy' Pinyan <pinyaj@rpi.edu> wrote:
> On Fri, 26 Sep 2003, David K. Wall wrote:
>
>>Glenn Jackman <xx087@freenet.carleton.ca> wrote:
>>
>>> reject($username) unless $username =~ /^[A-Za-z\d]{4,10}$/;
>>
>>Putting \d inside a character class matches '\' and 'd', not
>>digits.
>
> Not true. The pseudo-classes \w, \W, \s, \S, \d, and \D work fine
> in a character class.
Sheesh, my batting average is sucking. And I even tested it. (Note to
self: SLOW DOWN)
--
David Wall
------------------------------
Date: 26 Sep 2003 12:32:49 -0700
From: pv79@ddsl.net (Prashant Varghese)
Subject: Net-Telnet-Cisco module
Message-Id: <5ff7e2e0.0309261132.36a4e37e@posting.google.com>
Hi everybody,
I'm getting the following error when i try to unpack the Net-Telnet-Cisco module
from CPAN.Has anyone faced this ?How can get out of this problem?
#tar -zxvf Net-Telnet-Cisco-1.10.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
#
Kindly reply.
Thanks and Regards,
Prashant
------------------------------
Date: Fri, 26 Sep 2003 21:32:39 +0200
From: John Bokma <postmaster@castleamber.com.invalid>
Subject: Re: Net-Telnet-Cisco module
Message-Id: <1064604886.961737@halkan.kabelfoon.nl>
Prashant Varghese wrote:
> Hi everybody,
>
> I'm getting the following error when i try to unpack the Net-Telnet-Cisco module
> from CPAN.Has anyone faced this ?How can get out of this problem?
>
> #tar -zxvf Net-Telnet-Cisco-1.10.tar.gz
Which OS? IIRC Sun OS has a broken tar.
--
Kind regards, virtual home: http://johnbokma.com/ ICQ: 218175426
web site hints: http://johnbokma.com/websitedesign/
John I count my toes ~ one to ten ~ I meditate ~ and feel the Zen
------------------------------
Date: Fri, 26 Sep 2003 20:35:31 +0000 (UTC)
From: Louis Erickson <wwonko@rdwarf.com>
Subject: Re: Net-Telnet-Cisco module
Message-Id: <bl27uj$9ia$1@holly.rdwarf.com>
John Bokma <postmaster@castleamber.com.invalid> wrote:
: Prashant Varghese wrote:
:> Hi everybody,
:>
:> I'm getting the following error when i try to unpack the Net-Telnet-Cisco
:> module from CPAN.Has anyone faced this ?How can get out of this problem?
:>
:> #tar -zxvf Net-Telnet-Cisco-1.10.tar.gz
: Which OS? IIRC Sun OS has a broken tar.
How did you download it? If you used a browser, it may have helpfully
ungzipped it for you, and not mentioned that fact.
To find out, ask tar to run a table of contents of the file:
tar -tf Net-Telnet-Cisco-1.10.tar.gz
If that's the case, rename the file so there's no .gz extension or you'll
only be confused later. And don't download with that browser any more.
--
Louis Erickson - wwonko@rdwarf.com - http://www.rdwarf.com/~wwonko/
Any philosophy that can be put in a nutshell belongs there.
-- Sydney J. Harris
------------------------------
Date: Fri, 26 Sep 2003 20:38:16 GMT
From: Darren Dunham <ddunham@redwood.taos.com>
Subject: Re: Net-Telnet-Cisco module
Message-Id: <Ys1db.68$jn2.11593860@newssvr13.news.prodigy.com>
John Bokma <postmaster@castleamber.com.invalid> wrote:
> Prashant Varghese wrote:
>> Hi everybody,
>>
>> I'm getting the following error when i try to unpack the Net-Telnet-Cisco module
>> from CPAN.Has anyone faced this ?How can get out of this problem?
>>
>> #tar -zxvf Net-Telnet-Cisco-1.10.tar.gz
> Which OS? IIRC Sun OS has a broken tar.
(not that this has much to do with perl...)
You trimmed the wonderful error message.
>> gzip: stdin: not in gzip format
Sun tar doesn't recognize gzip files (or the -z) flag, so that's not the
problem. Tar says it's not a gzip file. Old versions of Netscape used
to ungzip dowloads, but keep the .gz extension...
Or maybe an ascii download of a binary file. Probably not, but closer
inspection of the file (or a second attempt to download) may be
warranted.
--
Darren Dunham ddunham@taos.com
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
------------------------------
Date: Fri, 26 Sep 2003 23:02:33 +0200
From: John Bokma <postmaster@castleamber.com.invalid>
Subject: Re: Net-Telnet-Cisco module
Message-Id: <1064610281.318015@halkan.kabelfoon.nl>
Darren Dunham wrote:
> John Bokma <postmaster@castleamber.com.invalid> wrote:
>
>>Prashant Varghese wrote:
>
>
>>>Hi everybody,
>>>
>>>I'm getting the following error when i try to unpack the Net-Telnet-Cisco module
>>>from CPAN.Has anyone faced this ?How can get out of this problem?
>>>
>>>#tar -zxvf Net-Telnet-Cisco-1.10.tar.gz
>
>>Which OS? IIRC Sun OS has a broken tar.
>
> (not that this has much to do with perl...)
> You trimmed the wonderful error message.
>
>>>gzip: stdin: not in gzip format
>
Ah... silly me.
> Sun tar doesn't recognize gzip files (or the -z) flag, so that's not the
Didn't know that. I remember that Sun's tar is broken somehow.
> problem. Tar says it's not a gzip file. Old versions of Netscape used
> to ungzip dowloads, but keep the .gz extension...
Weird. I remember IE messing up the extension.
--
Kind regards, virtual home: http://johnbokma.com/ ICQ: 218175426
web site hints: http://johnbokma.com/websitedesign/
John I count my toes ~ one to ten ~ I meditate ~ and feel the Zen
------------------------------
Date: Fri, 26 Sep 2003 21:39:05 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Net-Telnet-Cisco module
Message-Id: <x7pthn44cm.fsf@mail.sysarch.com>
>>>>> "JB" == John Bokma <postmaster@castleamber.com.invalid> writes:
>> Sun tar doesn't recognize gzip files (or the -z) flag, so that's not the
JB> Didn't know that. I remember that Sun's tar is broken somehow.
i wouldn't say broken, more like outdated. gnu tar has more features. i
use solaris but i have all the common gnu unix tools installed to
replace the solaris ones.
and i do use the -z option on tar all the time so i would never use
solaris' tar.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
Damian Conway Class in Boston - Sept 2003 -- http://www.stemsystems.com/class
------------------------------
Date: Fri, 26 Sep 2003 21:12:46 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: packages
Message-Id: <tpa9nv89pqffuq1qtjq1dhcekgbj95qoom@4ax.com>
Steve Grazzini wrote:
>Okay, this is not actually the case. In fact, CGI says that it
>doesn't use Exporter for reasons of "execution speed" -- but I
>still think it's better to be slow than incorrect, and that
>Exporter is not really so slow, and that constantly reinventing
>Exporter will eventually lead to *more* bloat, not less.
CGI.pm is accusing another, much smaller module than itself of bloat?!?
*boggle* (10k for Exporter vs. >200k for CGI.pm)
--
Bart.
------------------------------
Date: Fri, 26 Sep 2003 15:47:12 -0400
From: Chris Mattern <syscjm@gwu.edu>
Subject: Re: Someone abusing moderator priveledge?
Message-Id: <3F7497C0.7070006@gwu.edu>
Tom wrote:
> "Peter Hickman" <peter@semantico.com> wrote in message
> news:3f74053e$0$24112$afc38c87@news.easynet.co.uk...
>
>>Tom wrote:
>>
>>>I think one of the local cops in this group might be overstepping his
>>>boundaries and not posting my posts because of disagreements here.
>>
>>Do you honestly think that you are that important that people waste their
>
> time
>
>>keeping track of you?
>>
>>You are delusional.
>>
>
>
> It has nothing to do with that. It has to do with a clueless child being in
> a position they have no business being in.
Indeed. So why don't you get a few clues before proceeding?
> There happens to be an overabundance of such individuals in the world,
> otherwise we wouldn't have such fearful leaders currently in charge.
>
Chris Mattern
------------------------------
Date: Fri, 26 Sep 2003 14:51:59 -0500
From: Barry Kimelman <raisin@delete-this-trash.mts.net>
Subject: Re: Split variable into fields ?
Message-Id: <MPG.19de54d7452fbbf6989695@news.mts.net>
[This followup was posted to comp.lang.perl.misc]
In article <3f71a503$1@news.star.co.uk>, michael.benton@adpcl.co.uk
says...
> I am new to perl so appoligies in advance.
>
> I have a variable which is set to "A..A_B..B_C..C_D..D_123456"
> I would like to split this into fields using the "_" as a field delimeter
> (easy in awk and ksh)
>
> Is there a way to do this in perl ? is there an equiv to teh awk "-F_" ?
>
> Thanks
>
> Mike
$string = "A..A_B..B_C..C_D..D_123456";
@fields = split(/_/,$string);
------------------------------
Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re:
Message-Id: <3F18A600.3040306@rochester.rr.com>
Ron wrote:
> Tried this code get a server 500 error.
>
> Anyone know what's wrong with it?
>
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {
(---^
> dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
...
> Ron
...
--
Bob Walton
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 5571
***************************************