[17064] in Perl-Users-Digest
Perl-Users Digest, Issue: 4476 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 30 14:05:43 2000
Date: Sat, 30 Sep 2000 11:05:13 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <970337113-v9-i4476@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 30 Sep 2000 Volume: 9 Number: 4476
Today's topics:
Re: Al Gore's Mother Invented Perl <darryl@work-thicker.co.uk>
Re: Arrogant kid takes on huge group of programmers (wa <simonis@myself.com>
Re: Arrogant kid takes on huge group of programmers (wa <mcarruth@talk21.com>
Re: Arrogant kid takes on huge group of programmers (wa <mcarruth@talk21.com>
Re: Arrogant kid takes on huge group of programmers (wa <mcarruth@talk21.com>
Re: benefits of perl <nospam@david-steuber.com>
can't sort hash value <chris.lo@corp.sunday.com>
Re: can't sort hash value <mauldin@netstorm.net>
Re: can't sort hash value (Gwyn Judd)
Re: Candidate for the top ten perl mistakes list <nospam@david-steuber.com>
CGI trouble Rand25@juno.com
Re: Controlling a Serial Port <barbr-en@online.no>
Re: DBI and MS-Access <jeff@vpservices.com>
Re: Fehlermeldung beim =?iso-8859-1?Q?Ausf=FChren?= ein (Gwyn Judd)
Re: Fehlermeldung beim Ausführen eines Scripts! <replynews@bigfoot.com>
finding the structure of a hash <celliot@tartarus.uwa.edu.au>
Re: finding the structure of a hash (Gwyn Judd)
Re: finding the structure of a hash (Logan Shaw)
Re: finding the structure of a hash <celliot@tartarus.uwa.edu.au>
Re: finding the structure of a hash <godzilla@stomp.stomp.tokyo>
Re: How to get length of scalar? (Tim Hammerquist)
Re: How to get length of scalar? (Douglas Wilson)
Re: How to get length of scalar? <harrisr@bignet.net>
Re: Just Another Perl Hacker <nospam@david-steuber.com>
Module Install on Solaris 8? <pdurusau@emory.edu>
Re: Newbie can't handle the "true"th... explanation de <nospam@david-steuber.com>
Re: OFFTOPIC: Was: Al Gore's Mother Invented Perl <nospam@david-steuber.com>
OT: Arrogant kid takes on huge group of programmers (wa (Tim Hammerquist)
Re: Perl on PWS on Win ME <simonis@myself.com>
Re: Programmer Needed! <mc@backwoods.org>
Re: Salary Range for Perl Programmers <nospam@david-steuber.com>
Serious SMS-related question. (Was: Re: sending SMS) (Tony L. Svanstrom)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 30 Sep 2000 18:06:31 +0100
From: "CJ Llewellyn" <darryl@work-thicker.co.uk>
Subject: Re: Al Gore's Mother Invented Perl
Message-Id: <rsa5r8.m0a.ln@paulweller>
"Logan Shaw" <logan@cs.utexas.edu> wrote in message
news:8r1lup$qa2$1@provolone.cs.utexas.edu...
-snip-
> >I have never seen anything about british politics on this newsgroup.
> Me neither, but I have certainly seen lots about it in the
> conventional media, which is why I was thinking I could commiserate.
Hum, you don't want to see it either, there's not a lot to be said for a
goverment that wants to boost E-commerce by giving Internet access to the
unemployed and homeless.
--
Regards, CJ Llewellyn
http://www.cjll.uklinux.net/
------------------------------
Date: 30 Sep 2000 16:58:15 GMT
From: Drew Simonis <simonis@myself.com>
Subject: Re: Arrogant kid takes on huge group of programmers (was Re: How to get length of scalar?)
Message-Id: <39D61853.CEB6F5D9@myself.com>
Mark Carruth wrote:
>
> Thats probably because you're so old that there was very little programming
> when you were 13. Though I am happy that someone from CPAN has replied, I am
> glad my message is reaching important people.
>
For oh so many reasons....
* P L O N K *
------------------------------
Date: Sat, 30 Sep 2000 17:36:17 +0100
From: "Mark Carruth" <mcarruth@talk21.com>
Subject: Re: Arrogant kid takes on huge group of programmers (was Re: How to get length of scalar?)
Message-Id: <8r54rb$8v3$1@plutonium.btinternet.com>
Thats probably because you're so old that there was very little programming
when you were 13. Though I am happy that someone from CPAN has replied, I am
glad my message is reaching important people.
-----------------------------------------------
Mark Carruth
mcarruth@talk21.com
"Tim Hammerquist" <tim@degree.ath.cx> wrote in message
news:slrn8tc19k.q9.tim@degree.ath.cx...
Mark Carruth <mcarruth@talk21.com> wrote:
> OK, just to round off these little arguments.
>
> 1) Uri, my wife cannot call me in idiot as I am 13 and have no wife :P
No problem with that. I was doing 80x86 assembly programming at 13, so
there's no minimum age requirement in my book. As far as having a
wife...well, nevermind. =)
> 2) Fair enough, I am lazy for not posting Plain Text each time.
How much laziness if actually involved? I've never used Outlook Express
for news, but the difference between text and HTML in Netscape Messenger
was ever so slight.
> 3) I have no "responsibility" to take for my actions, it is not like I
have
> commited a crime.
Without insulting, this proves you don't understand usenet. And I
really get "annoyed" when people "quote" words "unnecessarily." Is
"responsibility" is so "foreign" a word that you feel it necessary to
"quote" it? See the signature below.
> 4) And as for the HTML argument, I don't write my WEB/HTML documents in
> anything other than HTML or PHP which is HTML with embedded code.
I missed the beginning of the thread, but was there an actual Perl
question? Someone appears to have asked how to get the length of a
scalar, and I assume he was given the standard 'perldoc -f length'
response. Here we have HTML and PHP. I do hope you intend to change
writing your dynamic web documents from PHP to Perl.
--
-Tim Hammerquist <timmy@cpan.org>
Usenet is essentially a HUGE group of people passing notes in class.
-- R. Kadel
------------------------------
Date: Sat, 30 Sep 2000 17:37:35 +0100
From: "Mark Carruth" <mcarruth@talk21.com>
Subject: Re: Arrogant kid takes on huge group of programmers (was Re: How to get length of scalar?)
Message-Id: <8r54to$95j$1@plutonium.btinternet.com>
I just wanna add that I think you may have interpreted that 1st quote
wrongly.
I wasn't saying that because I am 13 I cannot be called an idiot, I was just
pointing out that my wife could not call me an idiot as I am 13 and have no
wife.
--
-----------------------------------------------
Mark Carruth
mcarruth@talk21.com
"Tim Hammerquist" <tim@degree.ath.cx> wrote in message
news:slrn8tc19k.q9.tim@degree.ath.cx...
Mark Carruth <mcarruth@talk21.com> wrote:
> OK, just to round off these little arguments.
>
> 1) Uri, my wife cannot call me in idiot as I am 13 and have no wife :P
No problem with that. I was doing 80x86 assembly programming at 13, so
there's no minimum age requirement in my book. As far as having a
wife...well, nevermind. =)
> 2) Fair enough, I am lazy for not posting Plain Text each time.
How much laziness if actually involved? I've never used Outlook Express
for news, but the difference between text and HTML in Netscape Messenger
was ever so slight.
> 3) I have no "responsibility" to take for my actions, it is not like I
have
> commited a crime.
Without insulting, this proves you don't understand usenet. And I
really get "annoyed" when people "quote" words "unnecessarily." Is
"responsibility" is so "foreign" a word that you feel it necessary to
"quote" it? See the signature below.
> 4) And as for the HTML argument, I don't write my WEB/HTML documents in
> anything other than HTML or PHP which is HTML with embedded code.
I missed the beginning of the thread, but was there an actual Perl
question? Someone appears to have asked how to get the length of a
scalar, and I assume he was given the standard 'perldoc -f length'
response. Here we have HTML and PHP. I do hope you intend to change
writing your dynamic web documents from PHP to Perl.
--
-Tim Hammerquist <timmy@cpan.org>
Usenet is essentially a HUGE group of people passing notes in class.
-- R. Kadel
------------------------------
Date: Sat, 30 Sep 2000 17:42:20 +0100
From: "Mark Carruth" <mcarruth@talk21.com>
Subject: Re: Arrogant kid takes on huge group of programmers (was Re: How to get length of scalar?)
Message-Id: <8r556m$a9n$1@plutonium.btinternet.com>
I know I am getting boring now, but I really don't see why the huge group of
programmers are literally taking the piss out of me. I am new to newsgroups
so instead of slagging me off because I post HTML, someone could just tell
me not to, and then I would willingly turn off HTML posting which I have now
done.
And as for the quoting, I will quote whatever I like. There is no English
rule against it.
-----------------------------------------------
Mark Carruth
mcarruth@talk21.com
"Tim Hammerquist" <tim@degree.ath.cx> wrote in message
news:slrn8tc19k.q9.tim@degree.ath.cx...
> Mark Carruth <mcarruth@talk21.com> wrote:
> > OK, just to round off these little arguments.
> >
> > 1) Uri, my wife cannot call me in idiot as I am 13 and have no wife :P
>
> No problem with that. I was doing 80x86 assembly programming at 13, so
> there's no minimum age requirement in my book. As far as having a
> wife...well, nevermind. =)
>
> > 2) Fair enough, I am lazy for not posting Plain Text each time.
>
> How much laziness if actually involved? I've never used Outlook Express
> for news, but the difference between text and HTML in Netscape Messenger
> was ever so slight.
>
> > 3) I have no "responsibility" to take for my actions, it is not like I
have
> > commited a crime.
>
> Without insulting, this proves you don't understand usenet. And I
> really get "annoyed" when people "quote" words "unnecessarily." Is
> "responsibility" is so "foreign" a word that you feel it necessary to
> "quote" it? See the signature below.
>
> > 4) And as for the HTML argument, I don't write my WEB/HTML documents in
> > anything other than HTML or PHP which is HTML with embedded code.
>
> I missed the beginning of the thread, but was there an actual Perl
> question? Someone appears to have asked how to get the length of a
> scalar, and I assume he was given the standard 'perldoc -f length'
> response. Here we have HTML and PHP. I do hope you intend to change
> writing your dynamic web documents from PHP to Perl.
>
> --
> -Tim Hammerquist <timmy@cpan.org>
>
> Usenet is essentially a HUGE group of people passing notes in class.
> -- R. Kadel
------------------------------
Date: Sat, 30 Sep 2000 17:52:27 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Re: benefits of perl
Message-Id: <m31yy122ee.fsf@solo.david-steuber.com>
"Cameron Elliott" <celliot@tartarus.uwa.edu.au> writes:
' If anyone knows any other sites or articles about perl (esp. perl vs Emacs)
' please let me know..
Are you sure you don't mean Perl vs ELISP? Emacs is an editor that I
use to abuse Perl. Actually, I use XEmacs, but nobody cares what I
do.
You might want to look at Tcl:
http://dev.scriptics.com/
If they get there server back up ;-). They make some grandiose claims
wrt to Tcl vs Perl. There is also comp.lang.tcl. Have fun.
--
David Steuber | Perl apprentice, Apache/mod_perl user, and
NRA Member | general Internet web wannabe.
ICQ# 91465842 (Using Micq 0.4.6 under Linux)
It's time to be free: http://www.harrybrowne2000.org
------------------------------
Date: Sat, 30 Sep 2000 22:09:57 +0800
From: Chris Lo <chris.lo@corp.sunday.com>
Subject: can't sort hash value
Message-Id: <39D5F435.2A13E59@corp.sunday.com>
Hi,
I need some help with the sort hash by values, following the perldoc
example
Here is my program and error message:
60 my $key;
61 foreach $key (sort { $diskio{$a} <=> $diskio{$b} } keys %diskio)
{
62 printf "%4d %s\n", $diskio{$key}, $key;
63 }
64
Can't use "my $b" in sort comparison at ./foobar.pl line 61.
Any idea? I've tried different version of perl and have the similar
error message. I'm using
perl 5.005_3 on Linux Mandrake.
Thanks & Regards,
Chris
------------------------------
Date: Sat, 30 Sep 2000 14:23:47 GMT
From: Jim Mauldin <mauldin@netstorm.net>
Subject: Re: can't sort hash value
Message-Id: <39D5F739.FD2ADBB3@netstorm.net>
Chris Lo wrote:
>
> Hi,
>
> I need some help with the sort hash by values, following the perldoc
> example
> Here is my program and error message:
>
> 60 my $key;
> 61 foreach $key (sort { $diskio{$a} <=> $diskio{$b} } keys %diskio)
> {
> 62 printf "%4d %s\n", $diskio{$key}, $key;
> 63 }
> 64
>
> Can't use "my $b" in sort comparison at ./foobar.pl line 61.
>
> Any idea?
You have declared $b as a lexical variable using 'my' somewhere in your
program. The $a and $b used by sort are global package variables
reserved for sort comparisons, and your my $b declaration masks
$main::b. The best thing to do is to remove the 'my $b' declaration or
change your lexical $b to some other name if you need that variable for
something else (preferable). Otherwise, in sort, specify $main::a and
$main::b.
-- Jim
------------------------------
Date: Sat, 30 Sep 2000 14:59:06 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: can't sort hash value
Message-Id: <slrn8tbskl.rq.tjla@thislove.dyndns.org>
I was shocked! How could Chris Lo <chris.lo@corp.sunday.com>
say such a terrible thing:
>Hi,
>
>I need some help with the sort hash by values, following the perldoc
>example
>Here is my program and error message:
>
> 60 my $key;
> 61 foreach $key (sort { $diskio{$a} <=> $diskio{$b} } keys %diskio)
>{
> 62 printf "%4d %s\n", $diskio{$key}, $key;
> 63 }
> 64
>
>Can't use "my $b" in sort comparison at ./foobar.pl line 61.
Someone else has already given you an explanation but I thought I would
give you a hint as to how you can figure out these things for yourself.
Call it a fishing lesson. If you "use diagnostics" then it will give you
an explanation of what you did wrong, or if you prefer you can run them
through the "splain" program which will do the same thing:
[gwyn@thislove:~]$ splain
/usr/local/bin/splain: Reading from STDIN
Can't use "my $b" in sort comparison at - line 4 (#1)
Can't use "my $b" in sort comparison at - line 4 (#1) (#1)
(F) The global variables $a and $b are reserved for sort
comparisons.
You mentioned $a or $b in the same line as the <=> or cmp operator,
and the variable had earlier been declared as a lexical variable.
Either qualify the sort variable with the package name, or rename
the
lexical variable.
[gwyn@thislove:~]$
Hope that helps.
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Fortune's real live weird band names #567:
Rash of Stabbings
------------------------------
Date: Sat, 30 Sep 2000 17:39:56 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Re: Candidate for the top ten perl mistakes list
Message-Id: <m37l7t22z8.fsf@solo.david-steuber.com>
My biggest Perl mistake was trying to learn Perl. Now I am punishing
myself for this horrid mistake by trying to learn Perl.
--
David Steuber | Perl apprentice, Apache/mod_perl user, and
NRA Member | general Internet web wannabe.
ICQ# 91465842 (Using Micq 0.4.6 under Linux)
It's time to be free: http://www.harrybrowne2000.org
------------------------------
Date: Sat, 30 Sep 2000 17:43:03 GMT
From: Rand25@juno.com
Subject: CGI trouble
Message-Id: <8r58n6$510$1@nnrp1.deja.com>
I just installed Apache Server for Win32, and it seems to work fine,
but I cant access my cgi-bin directory to test a cgi script (test.cgi).
I tried http://localhost/cgi-bin/test.cgi, but I got an internal error.
What url should I use, and is there a way to browse my new "IntraNet"
without having to type localhost....its kinda long, and I'm really lazy.
I'm running Windows 98 and Apache 1.3.12.
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sat, 30 Sep 2000 18:13:04 +0200
From: =?iso-8859-1?Q?K=E5re_Olai_Lindbach?= <barbr-en@online.no>
Subject: Re: Controlling a Serial Port
Message-Id: <mioB5.1032$Q43.15940@news1.online.no>
<korthner@inf.furukawa.co.jp> skrev i melding
news:wk66ngww7q.fsf@inf.furukawa.co.jp...
> Simple enough, 'cept that I don't know where Win32::SerialPort is. If
I
[snip]
> Is there somwhere I can get thic Module from? Or does it ship with
the
> Activestate Perl? And Where cna I find the documentation?
Depends on your ActiveState Perl version:
Build 5xx on source 5.005: http://www.activestate.com/PPMPackages/5.005/
Build 6xx on source 5.6:
http://www.activestate.com/PPMPackages/5.6/
The bad news is that it's not yet compiled there under 5.6 :-(
I'm also waiting.
You migth look at CPAN (or mirrorsites) and find it there. But I'm not
sure if it's
updated to Perl-version 5.6.
http://sunsite.org.uk/packages/perl/CPAN/modules/by-module/Device/BBIRTH
/
Maybe best to ask Mr. BBIRTH directly (Bill Birthisel)
wcbirthisel@alum.mit.edu
at least he's one of the authors.
--
Regards/mvh
Olai - Mr. Kåre Olai Lindbach
(LLP - 955626397 MVA)
+ 47 61282501(home/job)
+ 47 95282501(mobil/cellular)
+ 47 61282502(fax)
barbr-en@online.no
http://barbr-en.home.online.no (Norwegian/English)
# HAR KASTET PERL'ER som ikke FOR-SVINner siden ' 94.
# Perl/Emacs(Viper)/Apache/MySQL
------------------------------
Date: Sat, 30 Sep 2000 08:09:01 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: DBI and MS-Access
Message-Id: <39D6020D.36BC1958@vpservices.com>
Oliver Vecernik wrote:
>
> Hi all,
>
> I'd like to read and write to '*.mdb' databases. Working on a NT box
> with DBI and ODBC does that job quite well. But is there a way to do it
> with a Linux (i386) box?
Yes.
> Is there something like ODBC or ADO? Or is
> there a DBD for MS-Access? Any sugguestions are highly appreciated!
Here's my suggestion: put "Ms-Access Linux" in the search box at
http://www.deja.com/usenet/ and read some of the 400 previously
discussed messages on this topic.
--
Jeff
------------------------------
Date: Sat, 30 Sep 2000 14:51:57 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Fehlermeldung beim =?iso-8859-1?Q?Ausf=FChren?= eines Scripts!
Message-Id: <slrn8tbs78.rq.tjla@thislove.dyndns.org>
I was shocked! How could Ralf Siedow <replynews@bigfoot.com>
say such a terrible thing:
>according to the output of my perl.pl script the variables are set:
>
>What can I do now?
Beats me then. Maybe you should ask in a unix group rather than a perl
group, hate to fob you off but it really is off topic.
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
I heard there was a lot of sex on television these days,
but when I tried it I kept falling off.
------------------------------
Date: Sat, 30 Sep 2000 15:06:56 +0200
From: "Ralf Siedow" <replynews@bigfoot.com>
Subject: Re: Fehlermeldung beim Ausführen eines Scripts!
Message-Id: <8r4ohp$gq7tb$1@ID-23826.news.cis.dfn.de>
> LANG
> LC_ALL
> LANGUAGE
>
according to the output of my perl.pl script the variables are set:
# /root/tmp/perl.pl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en",
LC_ALL = "en",
LANG = "en"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Key Definition
EDITOR --> /usr/bin/joe
ENV --> /root/.bashrc
HISTFILESIZE --> 1000
HISTSIZE --> 1000
HOME --> /root
HOSTNAME --> antares.universe
HOSTTYPE --> i586
INPUTRC --> /etc/inputrc
LANG --> en
LANGUAGE --> en
LC_ALL --> en
LESS --> -MM
LESSKEY --> /etc/.less
LINGUAS --> en_US:en
LOGNAME --> root
LS_COLORS -->
no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=0
1;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm
=01;32:*.bat=01;32:*.tar=01;31:*.tgz=01;31:*.tbz2=01;31:*.arc=01;31:*.arj=01
;31:*.taz=01;31:*.lzh=01;31:*.lha=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz
=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.jpg=01;35:*.jpeg=01;3
5:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:*.
tiff=01;35:
MACHTYPE --> i586-mandrake-linux-gnu
MAIL --> /var/spool/mail/root
OLDPWD --> /root/tmp
OSTYPE --> linux-gnu
PATH -->
/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
PS1 --> [\u@\h \W]\$
PWD --> /Storage/Zipped/Software
SECURE_LEVEL --> 4
SHELL --> /bin/bash
SHLVL --> 1
SSH_CLIENT --> 192.168.0.100 1257 22
SSH_TTY --> /dev/pts/0
TERM --> xterm
USER --> root
USERNAME --> root
VISUAL --> /usr/bin/joe
_ --> /root/tmp/perl.pl
I also did a
rpm --install --force locales-2.3-3mdk.noarch.rpm
locales-en-2.3-3mdk.noarch.rpm
to make sure the language packages are installed!
What can I do now?
cu Ralf
------------------------------
Date: Sun, 1 Oct 2000 00:08:51 +0800
From: "Cameron Elliott" <celliot@tartarus.uwa.edu.au>
Subject: finding the structure of a hash
Message-Id: <39d6105e$0$22264@echo-01.iinet.net.au>
Hi,
I have a hash and I would like to know what is stored in it exactly.
How can I go about this?
Is there a way to find out the exact structure of the hash as well?
Currently I am using
while ( ($key, $value) = each %grp_data) {
print "$key = $value\n";
}
but that is coming up with
the $value as ARRAY(0xb92044) or HASH(0xbc1384)
any help please
thankyou
------------------------------
Date: Sat, 30 Sep 2000 16:19:56 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: finding the structure of a hash
Message-Id: <slrn8tc1c7.1kn.tjla@thislove.dyndns.org>
I was shocked! How could Cameron Elliott <celliot@tartarus.uwa.edu.au>
say such a terrible thing:
>Hi,
>
>I have a hash and I would like to know what is stored in it exactly.
>How can I go about this?
>
>Is there a way to find out the exact structure of the hash as well?
How about this:
use Data::Dumper;
print Dumper \%my_hash;
And here is the documentation:
perldoc Data::Dumper
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
There once was a young man named Gene,
Who invented a screwing machine.
Concave and convex,
It served either sex,
And it played with itself inbetween.
------------------------------
Date: 30 Sep 2000 11:27:13 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: finding the structure of a hash
Message-Id: <8r5491$45h$1@provolone.cs.utexas.edu>
In article <39d6105e$0$22264@echo-01.iinet.net.au>,
Cameron Elliott <celliot@tartarus.uwa.edu.au> wrote:
>I have a hash and I would like to know what is stored in it exactly.
>How can I go about this?
>
>Is there a way to find out the exact structure of the hash as well?
It's a set of keys, each of which has a value associated with it.
>Currently I am using
>
> while ( ($key, $value) = each %grp_data) {
> print "$key = $value\n";
> }
>
>but that is coming up with
>the $value as ARRAY(0xb92044) or HASH(0xbc1384)
Well then, that's what's stored there -- a reference to an array or a
hash.
If you'd like to see the whole data structure, there are two easy ways
to do it. Either go into the debugger ("perldoc perldebug") and type
something like "x \%grp_data" at the appropriate point, or use
Data::Dumper ("perldoc Data::Dumper").
Or, if you want, recursively search the space yourself and use ref() to
figure out how to deal with each scalar.
Hope that helps.
- Logan
------------------------------
Date: Sun, 1 Oct 2000 00:25:24 +0800
From: "Cameron Elliott" <celliot@tartarus.uwa.edu.au>
Subject: Re: finding the structure of a hash
Message-Id: <39d6142c$0$22261@echo-01.iinet.net.au>
Thanks..
now I just have to figure out how to get Data::Dumper to work on my machine
:)
Gwyn Judd <tjla@guvfybir.qlaqaf.bet> wrote in message
news:slrn8tc1c7.1kn.tjla@thislove.dyndns.org...
> I was shocked! How could Cameron Elliott <celliot@tartarus.uwa.edu.au>
> say such a terrible thing:
> >Hi,
> >
> >I have a hash and I would like to know what is stored in it exactly.
> >How can I go about this?
> >
> >Is there a way to find out the exact structure of the hash as well?
>
> How about this:
>
> use Data::Dumper;
>
> print Dumper \%my_hash;
>
> And here is the documentation:
>
> perldoc Data::Dumper
>
> --
> Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
> There once was a young man named Gene,
> Who invented a screwing machine.
> Concave and convex,
> It served either sex,
> And it played with itself inbetween.
------------------------------
Date: Sat, 30 Sep 2000 10:48:04 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: finding the structure of a hash
Message-Id: <39D62754.34E8A7FE@stomp.stomp.tokyo>
Cameron Elliott wrote:
> I have a hash...
You have an Associative Array.
Hash is fancy dog food for humans.
> ...and I would like to know what is stored in it exactly.
You created this Associative Array or programmed your
script to create this Associative Array. Why would
you not know what it contains?
> How can I go about this?
Programming your script to display the
contents of this Associative Array would
be quite logical.
> Is there a way to find out the exact structure of the hash as well?
No, not really. Perl core creates arrays per a set of
rules which are quite flexible. These rules establish
an array structure based on efficiency and speed of
access for perl core. An array structure within perl
core looks nothing like what you might assume. If
you could see this structure, in what way would
this benefit you? You cannot change this structure
and regardless of how an array is structured, your
program will still display the same behavior.
> Currently I am using
> while ( ($key, $value) = each %grp_data) {
> print "$key = $value\n";
> }
Oh.
> but that is coming up with
> the $value as ARRAY(0xb92044) or HASH(0xbc1384)
You are clearly not correctly referencing your array.
I've never had this word "HASH" returned under a bad
array reference. Interesting.
> any help please
Best help is to help yourself. You have provided no
parameters with which to work. You have not stated
what type of Associative Array with which you are
working nor how each element of your Associative
Array is delimited. Assuming your array name is
@grp_data, assuming you are using a colon as an
element delimiter, assuming only two variables
per element and assuming your Associative Array
is standard issue one dimensional,
foreach $element (@grp_data)
{
($key, $value) = split (/:/, $element);
print "$key = $value\n";
}
Godzilla!
--
Dr. Kiralynne Schilitubi ¦ Cooling Fan Specialist
UofD: University of Duh! ¦ ENIAC Hard Wiring Pro
BumScrew, South of Egypt ¦ HTML Programming Class
------------------------------
Date: Sat, 30 Sep 2000 15:19:58 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: How to get length of scalar?
Message-Id: <slrn8tc1v3.q9.tim@degree.ath.cx>
Randy Harris <harrisr@bignet.net> wrote:
> Take a look at
> Tools->Options->Send in your Outlook Express menu. There you will see
> that there are separate settings for Mail Sending Format and News
> Sending Format. There is no reason why you cannot set mail to HTML and
> news to Plain Text.
Upon reading, I seem to remember that even using Redmondware's Outlook
Express, email defaulted to HTML, but news defaulted to text. If Mark's
puta came this way, that would require someone, I'm not saying who,
going into Tools->Options->Send and changing the News setting _to_ HTML.
I understand the concept of "Ooh! Neat! I can post in color on Usenet!"
But I also understand that within 3 seconds of my first HTML news post
to clpm, I got a form letter from Tom Christiansen himself (or his computer
anyway) stating that I should not post in HTML, and cited several
sources backing up his claim. If you haven't already received this
letter, you might try forwarding a few of your comments to him; it would
be most enlightening.
Since then, both email and news posts are both in plain text. I use no
formatting which can't be reasonably duplicated with a few spaces in
plain text.
Not to mention, you get the added benefit and luxury of _not_ having an
entire community flaming you.
OTOH, if you want to be right _that_ much, by all means continue the
thread and face consequences.
--
-Tim Hammerquist <timmy@cpan.org>
Of course, that's just my opinion. I could be wrong.
-- Dennis Miller
------------------------------
Date: Sat, 30 Sep 2000 17:37:06 GMT
From: dwilson@gtemail.net (Douglas Wilson)
Subject: Re: How to get length of scalar?
Message-Id: <39d54cfc.642205@news>
On Sat, 30 Sep 2000 10:58:19 +0100, "Mark Carruth" <mcarruth@talk21.com> wrote:
>Yes, do you?
(a plethora of text clipped between this answer at the
top, and the question below at the bottom)
>"Zaphod" <zaphod@psnw.com> wrote in message
>news:39D509BD.8CF36601@psnw.com...
>>
>>Do you really not understand the concept of a news "group"?
[Doug chants "stay out of this" 100 times, but to no avail]
Ok, jeopardy style quotes and all, he has admitted (read
that question carefully..) that he does NOT understand newsgroups
('so kay, I've never made the claim that I don't not understand them).
There, can that be the end of it (oh well, I didn't think so... :-)
Douglas Wilson
------------------------------
Date: Sat, 30 Sep 2000 13:48:05 -0400
From: "Randy Harris" <harrisr@bignet.net>
Subject: Re: How to get length of scalar?
Message-Id: <stc9pgdebeue1@corp.supernews.com>
Tim Hammerquist <tim@degree.ath.cx> wrote in message
news:slrn8tc1v3.q9.tim@degree.ath.cx...
> Randy Harris <harrisr@bignet.net> wrote:
> > Take a look at
> > Tools->Options->Send in your Outlook Express menu. There you will
see
> > that there are separate settings for Mail Sending Format and News
> > Sending Format. There is no reason why you cannot set mail to HTML
and
> > news to Plain Text.
>
> Upon reading, I seem to remember that even using Redmondware's Outlook
> Express, email defaulted to HTML, but news defaulted to text. If
Mark's
> puta came this way, that would require someone, I'm not saying who,
> going into Tools->Options->Send and changing the News setting _to_
HTML.
>
That is correct
> I understand the concept of "Ooh! Neat! I can post in color on
Usenet!"
> But I also understand that within 3 seconds of my first HTML news post
> to clpm, I got a form letter from Tom Christiansen himself (or his
computer
> anyway) stating that I should not post in HTML, and cited several
> sources backing up his claim. If you haven't already received this
> letter, you might try forwarding a few of your comments to him; it
would
> be most enlightening.
>
I don't understand why you are directing this toward me. I haven't
posted with HTML.
> Since then, both email and news posts are both in plain text. I use
no
> formatting which can't be reasonably duplicated with a few spaces in
> plain text.
>
> Not to mention, you get the added benefit and luxury of _not_ having
an
> entire community flaming you.
>
No one has. At least not until you came along.
> OTOH, if you want to be right _that_ much, by all means continue the
> thread and face consequences.
> --
Right about what? The settings in Outlook Express?
> -Tim Hammerquist <timmy@cpan.org>
>
> Of course, that's just my opinion. I could be wrong.
> -- Dennis Miller
------------------------------
Date: Sat, 30 Sep 2000 17:37:37 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Re: Just Another Perl Hacker
Message-Id: <m3aecp2333.fsf@solo.david-steuber.com>
Tony Curtis <tony_curtis32@yahoo.com> writes:
' > I think de Fermat was an evil trickster.
'
' He should 'a used a better fermatter.
Ouch!
If puns are judged on their ability to inflict pain, this one wasn't
bad.
--
David Steuber | Perl apprentice, Apache/mod_perl user, and
NRA Member | general Internet web wannabe.
ICQ# 91465842 (Using Micq 0.4.6 under Linux)
It's time to be free: http://www.harrybrowne2000.org
------------------------------
Date: Sat, 30 Sep 2000 18:00:49 GMT
From: Patrick Durusau <pdurusau@emory.edu>
Subject: Module Install on Solaris 8?
Message-Id: <39D62B00.9DC28AD2@emory.edu>
Hello,
I am running gcc version 2.95.2 on a Solaris 8 box and cannot get
several Perl modules to compile.
HTML-Parser-3.13, for example returns:
cc -c -xO3 -xdepend -DVERSION=\"3.13\" -DXS_VERSION=\"3.13\"
-KPIC -I/usr
/perl5/5.00503/sun4-solaris/CORE -DMARKED_SECTION Parser.c
cc: unrecognized option `-KPIC'
cc: language depend not recognized
Similar errors from other modules. I have a symbolic link from gcc to
cc.
I have compiled apache and qmail today so I don't think it is a problem
with the compiler.
Suggstions, comments?
Many thanks!
Patrick
--
Patrick Durusau
Director of Research and Development
Society of Biblical Literature
pdurusau@emory.edu
------------------------------
Date: Sat, 30 Sep 2000 17:59:31 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Re: Newbie can't handle the "true"th... explanation desired
Message-Id: <m3ya09zrp9.fsf@solo.david-steuber.com>
Tautology of the moment:
true is not false.
Another one:
true is not empty.
Anything whatsoever assigned to a scaler is true except "0", "", and
undef. At least, that is how I understand it. Actually, I think
undef makes the name go away.
use strict;
--
David Steuber | Perl apprentice, Apache/mod_perl user, and
NRA Member | general Internet web wannabe.
ICQ# 91465842 (Using Micq 0.4.6 under Linux)
It's time to be free: http://www.harrybrowne2000.org
------------------------------
Date: Sat, 30 Sep 2000 17:28:04 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Re: OFFTOPIC: Was: Al Gore's Mother Invented Perl
Message-Id: <m3d7hl23j1.fsf@solo.david-steuber.com>
kcivey@cpcug.org (Keith Calvert Ivey) writes:
' The stupidest recent one is that when speaking to an audience of
' union members he said his mother used to sing him to sleep with
' "Look for the Union Label". Now idiots are complaining that the
' song wasn't written until Gore was 27. Apparently for some
' people you need to hold up a sign saying "This is a joke".
While we are so far off topic...
There was this speach writer who wrote all the speaches for a
Presidential candidate. He worked hard and felt he deserved more
pay. He asked for a raise and was turned down rahter rudely. The
politician never read his speaches before giving them. So his
next speach, written on 3x5 cards went something like this:
1) Taxes are too high. I'm going to lower them and keep the budget
ballanced, and I'll tell you how.
2) Inflation is too high. I'm going to lower it, and I'll tell you
how.
3) The crime rate is too high. I'll lower crime, and I'll tell you
how.
4) You're on your own now, you son of a bitch!
--
David Steuber | Perl apprentice, Apache/mod_perl user, and
NRA Member | general Internet web wannabe.
ICQ# 91465842 (Using Micq 0.4.6 under Linux)
It's time to be free: http://www.harrybrowne2000.org
------------------------------
Date: Sat, 30 Sep 2000 15:08:32 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: OT: Arrogant kid takes on huge group of programmers (was Re: How to get length of scalar?)
Message-Id: <slrn8tc19k.q9.tim@degree.ath.cx>
Mark Carruth <mcarruth@talk21.com> wrote:
> OK, just to round off these little arguments.
>
> 1) Uri, my wife cannot call me in idiot as I am 13 and have no wife :P
No problem with that. I was doing 80x86 assembly programming at 13, so
there's no minimum age requirement in my book. As far as having a
wife...well, nevermind. =)
> 2) Fair enough, I am lazy for not posting Plain Text each time.
How much laziness if actually involved? I've never used Outlook Express
for news, but the difference between text and HTML in Netscape Messenger
was ever so slight.
> 3) I have no "responsibility" to take for my actions, it is not like I have
> commited a crime.
Without insulting, this proves you don't understand usenet. And I
really get "annoyed" when people "quote" words "unnecessarily." Is
"responsibility" is so "foreign" a word that you feel it necessary to
"quote" it? See the signature below.
> 4) And as for the HTML argument, I don't write my WEB/HTML documents in
> anything other than HTML or PHP which is HTML with embedded code.
I missed the beginning of the thread, but was there an actual Perl
question? Someone appears to have asked how to get the length of a
scalar, and I assume he was given the standard 'perldoc -f length'
response. Here we have HTML and PHP. I do hope you intend to change
writing your dynamic web documents from PHP to Perl.
--
-Tim Hammerquist <timmy@cpan.org>
Usenet is essentially a HUGE group of people passing notes in class.
-- R. Kadel
------------------------------
Date: 30 Sep 2000 17:01:39 GMT
From: Drew Simonis <simonis@myself.com>
Subject: Re: Perl on PWS on Win ME
Message-Id: <39D6191E.E775E988@myself.com>
Jim Gaasedelen wrote:
>
> You can't seem to get it through your head, can you? Security is NOT
> always a
> problem for everyone. I know. It is NOT a problem for me!!!
Ignorance like this is exactly why security _is_ a problem for
everyone. Thanks for being part of the problem.
------------------------------
Date: Sat, 30 Sep 2000 11:56:58 -0400
From: MC <mc@backwoods.org>
Subject: Re: Programmer Needed!
Message-Id: <39D60D4A.7F0CD614@backwoods.org>
$70/hr, contact if interested. MC
April Melton wrote:
>
> I have a partially perl written program. The script is functional
> except for one sub-routine that doesn't work properly. It's
> probably a simple error I can't see after hours of looking for it.
>
> The sub-routine is sub delete.
> It is supposed to take some submitted form
> information, write it to a temporary file & close the file.
> Then it should open a flat file datebase, read the
> information & unlink corresponding files. And finally,
> it should re-open the temp file and create new files to
> replace the old.
>
> If you'd like to take a stab at this freelance project,
> please email me for further details & tell me your hourly rate.
>
> Sincerely,
> April D. Melton
> (319) 266-5020
--
---------------------------------------------------------------------
Remove the .mc from the end of my email address before replying.
---------------------------------------------------------------------
I haven't lost my mind!!! It's backed up on disk.
"The world wont end with a bang, or even a whimper, but with an error
message." -- format C:
------------------------------
Date: Sat, 30 Sep 2000 17:41:46 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Re: Salary Range for Perl Programmers
Message-Id: <m34s2x22w7.fsf@solo.david-steuber.com>
"Nicolas MONNET" <nico@monnet.to> writes:
' Offtopic: I'd never get around to understand why some people
' seem to be so proud to announce to the world the content
' of their killfile.
How about those replies that quote an entire post and at the bottom
just say,
*plonk*
?
Me too!
--
David Steuber | Perl apprentice, Apache/mod_perl user, and
NRA Member | general Internet web wannabe.
ICQ# 91465842 (Using Micq 0.4.6 under Linux)
It's time to be free: http://www.harrybrowne2000.org
------------------------------
Date: Sat, 30 Sep 2000 16:28:39 +0200
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Serious SMS-related question. (Was: Re: sending SMS)
Message-Id: <1ehs5is.qyf4e3g0v2zqN%tony@svanstrom.com>
Alan J. Flavell <flavell@mail.cern.ch> wrote:
> On Fri, 29 Sep 2000, Paul Morris wrote:
>
> > Web gateway or mobile phone?
>
> <OT>
> Neither. I use modem dial-up.
> </>
I did a quick search without finding something, but... has anyone done
anything serious when it comes to sending SMS (ie ready-made module or
sumthin) by connecting via an operators dial-in server? I'm guessing
there's a standard there.
/Tony
--
/\___/\ Who would you like to read your messages today? /\___/\
\_@ @_/ Protect your privacy: <http://www.pgpi.com/> \_@ @_/
--oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
on the verge of frenzy - i think my mask of sanity is about to slip
---ôôô---ôôô-----------------------------------------------ôôô---ôôô---
\O/ \O/ ©99-00 <http://www.svanstrom.com/?ref=news> \O/ \O/
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 4476
**************************************