[24919] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 7169 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 23 06:09:47 2004

Date: Thu, 23 Sep 2004 03:05:16 -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           Thu, 23 Sep 2004     Volume: 10 Number: 7169

Today's topics:
    Re: comp.lang.perl no longer on groups.google.com <matthew.garrish@sympatico.ca>
    Re: comp.lang.perl no longer on groups.google.com <rob_gamble99@hotmail.com>
        embedded perl path $ENV{PATH} problem (R. Sherwin Kartick)
        Get the list of directories <moghrabi@inrialpes.fr>
    Re: Get the list of directories <tore@aursand.no>
    Re: Get the list of directories <tintin@invalid.invalid>
    Re: Get the list of directories <Graham.T.Wood@oracle.com>
    Re: How is this Perl Script encrypted? <kkeller-usenet@wombat.san-francisco.ca.us>
    Re: How is this Perl Script encrypted? i6033162556-signup1@yahoo.com.cn
        how to get the true ip address when i use proxy? <fayland@gmail.com>
    Re: how to get the true ip address when i use proxy? <fayland@gmail.com>
    Re: Modulus Operator (%) (Andres Monroy-Hernandez)
    Re: Modulus Operator (%) <eric-amick@comcast.net>
    Re: new commands written in perl <emschwar@pobox.com>
    Re: new commands written in perl <abigail@abigail.nl>
    Re: order a semicolon-separated data file by a value of <mritty@gmail.com>
    Re: order a semicolon-separated data file by a value of <postmaster@castleamber.com>
    Re: order a semicolon-separated data file by a value of <someone@example.com>
    Re: order a semicolon-separated data file by a value of (Gerhard M)
    Re: parse_html_string reports error (AR John)
        perk 5.8.5 forking causes userland crash on FreeBSD <peter@gradwell.com>
        pp --addfile query <iss025@bangor.ac.uk>
    Re: Printing an array of hash refs (Tony N.)
    Re: Printing an array of hash refs (Jay Tilton)
    Re: what module could easiely load all files to a @arra <end@dream.life>
    Re: what module could easiely load all files to a @arra (Peter Scott)
    Re: what module could easiely load all files to a @arra <end@dream.life>
    Re: what module could easiely load all files to a @arra <end@dream.life>
    Re: what module could easiely load all files to a @arra <bernard.el-haginDODGE_THIS@lido-tech.net>
    Re: what module could easiely load all files to a @arra <tore@aursand.no>
    Re: what module could easiely load all files to a @arra (Gerhard M)
    Re: what module could easiely load all files to a @arra <mritty@gmail.com>
    Re: XMLout() output causes "not well-formed (invalid to <eric-amick@comcast.net>
    Re: XMLout() output causes "not well-formed (invalid to (pt)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 22 Sep 2004 18:25:48 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: comp.lang.perl no longer on groups.google.com
Message-Id: <JZm4d.17260$bL1.899433@news20.bellglobal.com>


"Uri Guttman" <uri@stemsystems.com> wrote in message 
news:x77jqmkpx2.fsf@mail.sysarch.com...
>>>>>> "GH" == Gunnar Hjalmarsson <noreply@gunnar.cc> writes:
>
>  GH> Uri Guttman wrote:
>  >>>>>>> "BM" == Brian McCauley <nobull@mail.com> writes:
>  BM> groups.google.com has finally dropped comp.lang.perl.  I'd
>  >> tried
>  BM> to persuade them to keep it but to include a prominant warning.  I
>  BM> failed.
>  >> hopefully they still archive and keep searchable the old stuff when
>  >> it
>  >> was a live group.
>
>  GH> "This group is no longer archived" indicates something else. :(
>
> that could mean no longer 'actively' archived. i see no reason why they
> won't keep the old posts as it was the only valid perl group in those
> days. i don't think they would delete the group from the archive but
> more likely just stop adding any new posts in the group to the archive.
>

I suspect you are right. A quick search came up with postings going back to 
1990. You no longer have the option of searching only in comp.lang.perl, 
though (although I'm not sure if this was ever available). All that appears 
is the ability to restrict your searches to comp.lang.perl.* (and entering 
comp.lang.perl in the advanced form doesn't work either).

Matt 




------------------------------

Date: Wed, 22 Sep 2004 19:14:18 -0400
From: Robert Gamble <rob_gamble99@hotmail.com>
Subject: Re: comp.lang.perl no longer on groups.google.com
Message-Id: <pan.2004.09.22.23.14.16.964062@hotmail.com>

On Wed, 22 Sep 2004 18:25:48 -0400, Matt Garrish wrote:

> 
> "Uri Guttman" <uri@stemsystems.com> wrote in message 
> news:x77jqmkpx2.fsf@mail.sysarch.com...
>>>>>>> "GH" == Gunnar Hjalmarsson <noreply@gunnar.cc> writes:
>>
>>  GH> Uri Guttman wrote:
>>  >>>>>>> "BM" == Brian McCauley <nobull@mail.com> writes:
>>  BM> groups.google.com has finally dropped comp.lang.perl.  I'd
>>  >> tried
>>  BM> to persuade them to keep it but to include a prominant warning.  I
>>  BM> failed.
>>  >> hopefully they still archive and keep searchable the old stuff when
>>  >> it
>>  >> was a live group.
>>
>>  GH> "This group is no longer archived" indicates something else. :(
>>
>> that could mean no longer 'actively' archived. i see no reason why they
>> won't keep the old posts as it was the only valid perl group in those
>> days. i don't think they would delete the group from the archive but
>> more likely just stop adding any new posts in the group to the archive.
>>
> 
> I suspect you are right. A quick search came up with postings going back to 
> 1990. You no longer have the option of searching only in comp.lang.perl, 
> though (although I'm not sure if this was ever available). All that appears 
> is the ability to restrict your searches to comp.lang.perl.* (and entering 
> comp.lang.perl in the advanced form doesn't work either).
> 
> Matt

comp.lang.perl is still available on Google Groups 2
(http://groups-beta.google.com/group/comp.lang.perl) with the ability to
search and even subscribe or post new articles.  Although there is no
notice stating the group is no longer archived, new articles do not appear
to be available.

Rob Gamble


------------------------------

Date: 22 Sep 2004 15:29:46 -0700
From: rskartick@gmail.com (R. Sherwin Kartick)
Subject: embedded perl path $ENV{PATH} problem
Message-Id: <311fa809.0409221429.76de81cc@posting.google.com>

I have embedded perl in my c program, however I have encountered a
problem where the $ENV{PATH} can only be updated in the first
PerlInterpreter instance.
I get "unable to start foo.sh: No such file or directory at -e line
2."  It appears perl is not using the updated PATH.

I am using perl 5.8.0, compile-time options: DEBUGGING MULTIPLICITY
USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT on Red Hat
Enterprise Linux WS release 3 (Taroon Update 1).

The following is from the docs with modifications to show the problem:

 #include <EXTERN.h>
 #include <perl.h>

 #define SAY_HELLOA "-e", "print qq(Hi, A I'm $^X\n)"
 #define SAY_HELLOB "-e", "print qq(Hi, B I'm $^X\n); $ENV{PATH} .=
\":/home/username/foo\"; open(FOO, \"foo.sh |\") or die \"unable to
start foo.sh: $!\"; close FOO;"
 int main(int argc, char **argv, char **env)
 {
     PerlInterpreter
         *one_perl = perl_alloc(),
         *two_perl = perl_alloc();
     char *one_args[] = { "one_perl", SAY_HELLOA };
     char *two_args[] = { "two_perl", SAY_HELLOB};
     PERL_SET_CONTEXT(one_perl);
     perl_construct(one_perl);
     PERL_SET_CONTEXT(two_perl);
     perl_construct(two_perl);
     PERL_SET_CONTEXT(one_perl);
     perl_parse(one_perl, NULL, 3, one_args, (char **)NULL);
     PERL_SET_CONTEXT(two_perl);
     perl_parse(two_perl, NULL, 3, two_args, (char **)NULL);
     PERL_SET_CONTEXT(one_perl);
     perl_run(one_perl);
     PERL_SET_CONTEXT(two_perl);
     perl_run(two_perl);
     PERL_SET_CONTEXT(one_perl);
     perl_destruct(one_perl);
     PERL_SET_CONTEXT(two_perl);
     perl_destruct(two_perl);
     PERL_SET_CONTEXT(one_perl);
     perl_free(one_perl);
     PERL_SET_CONTEXT(two_perl);
     perl_free(two_perl);
 }


This program will fail, yes foo.sh exists and it is not in my initial
path.  However, if you run SAY_HELLOB in the the first interpreter
everything will work!

char *one_args[] = { "one_perl", SAY_HELLOB };
char *two_args[] = { "two_perl", SAY_HELLOA};

Any ideas, suggestions.  I have tried this on win32 and it works fine.

thanks ... sherwin


------------------------------

Date: Thu, 23 Sep 2004 10:35:09 +0200
From: Xavier MOGHRABI <moghrabi@inrialpes.fr>
Subject: Get the list of directories
Message-Id: <ciu1ta$bp2$1@trompette.imag.fr>

Hello,

I'm writing a perl script and I need to get the list of directories of a
directory.

I tried few tests but there failed.

In fact I need this list to open the last directory created.

For the moment I've writen this but it doesn't work because in my variable
$retval I don't obtain the list of the directories :

$retval = system "ls -C $ENV{RESULT_DIR}";
@rep = split("\t",$retval);

Any help is welcome.

Thanks for you further help

-- 
Xavier MOGHRABI - Consortium ObjecWeb
Email : xavier.moghrabi at inrialpes.fr
Phone : +33 4 76 61 55 25



------------------------------

Date: Thu, 23 Sep 2004 11:01:49 +0200
From: Tore Aursand <tore@aursand.no>
Subject: Re: Get the list of directories
Message-Id: <pan.2004.09.23.09.01.48.924728@aursand.no>

On Thu, 23 Sep 2004 10:35:09 +0200, Xavier MOGHRABI wrote:
> I'm writing a perl script and I need to get the list of directories of a
> directory.

This one could help:

  #!/usr/bin/perl
  #
  use strict;
  use warnings;
  use File::Find::Rule;

  my $dir  = '/whatever';
  my @dirs = File::Find::Rule->directory()->maxdepth( 1 )->in( $dir );

> In fact I need this list to open the last directory created.

The list won't open it for you.  See 'perldoc -f opendir' for that.  To
sort @dirs;

  my @sorted = sort {
      -M $a <=> -M $b
  } @dirs;

This sort isn't optimal, though...

> $retval = system "ls -C $ENV{RESULT_DIR}";

No need to make this platform dependent.


-- 
Tore Aursand <tore@aursand.no>
"What we anticipate seldom occurs. What we least expected generally
 happens." (Benjamin Disraeli)


------------------------------

Date: Thu, 23 Sep 2004 21:45:16 +1200
From: "Tintin" <tintin@invalid.invalid>
Subject: Re: Get the list of directories
Message-Id: <2rfk7uF1af21nU1@uni-berlin.de>


"Xavier MOGHRABI" <moghrabi@inrialpes.fr> wrote in message 
news:ciu1ta$bp2$1@trompette.imag.fr...
> Hello,
>
> I'm writing a perl script and I need to get the list of directories of a
> directory.
>
> I tried few tests but there failed.
>
> In fact I need this list to open the last directory created.
>
> For the moment I've writen this but it doesn't work because in my variable
> $retval I don't obtain the list of the directories :
>
> $retval = system "ls -C $ENV{RESULT_DIR}";
> @rep = split("\t",$retval);
>

Many different ways to do this.  One is:

my @dirs;

foreach my $dir (<$ENV{RESULT_DIR}/*>) {
  next unless -f $dir;
  push @dirs,$dir;
}







------------------------------

Date: Thu, 23 Sep 2004 10:55:19 +0100
From: Graham Wood <Graham.T.Wood@oracle.com>
Subject: Re: Get the list of directories
Message-Id: <41529D87.98394BBF@oracle.com>

Tintin wrote:
> 
> "Xavier MOGHRABI" <moghrabi@inrialpes.fr> wrote in message
> news:ciu1ta$bp2$1@trompette.imag.fr...
> > Hello,
> >
> > I'm writing a perl script and I need to get the list of directories of a
> > directory.
> 
> Many different ways to do this.  One is:
> 
> my @dirs;
> 
> foreach my $dir (<$ENV{RESULT_DIR}/*>) {
>   next unless -f $dir;
>   push @dirs,$dir;
> }

Isn't this adding the files rather than directories?  -f is true if $dir
is a file.  I think you want -d $dir.

Graham


------------------------------

Date: Wed, 22 Sep 2004 15:51:32 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: How is this Perl Script encrypted?
Message-Id: <k8c922x1ne.ln2@goaway.wombat.san-francisco.ca.us>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

On 2004-09-22, i6033162556-signup1@yahoo.com.cn <i6033162556-signup1@yahoo.com.cn> wrote:
> I think I am not wasting time, as this code is 100% protected.
> Unbreakable.

Yeah, unbreakable like a Kryptonite lock!  ;-O

- --keith

- -- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom

-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBUgHyhVcNCxZ5ID8RAvchAJ9g4r60T/v/0F5uRh0Urx/5JmvdwgCeJtof
aBUFVMFFDtLtGoQjYviYIns=
=fuJQ
-----END PGP SIGNATURE-----


------------------------------

Date: 23 Sep 2004 01:16:40 -0700
From: i6033162556-signup1@yahoo.com.cn
Subject: Re: How is this Perl Script encrypted?
Message-Id: <23d1674e.0409230016.7dc67c92@posting.google.com>

"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message news:<Xns956CAF761B39Aasu1cornelledu@132.236.56.8>...
> i6033162556-signup1@yahoo.com.cn wrote in
> news:23d1674e.0409221119.166cb8de@posting.google.com: 
> 
> [ Don't snip attributions ]
> 
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in
> news:Xns956C5659DF5DBasu1cornelledu@132.236.56.8: 
> 
> >> Your time working on this is wasted.
>  
> > I think I am not wasting time, as this code is 100% protected.
> > Unbreakable.
> 
> That is more a statement about your abilities than the strength of the 
> protection scheme.
> 
> > If you don't think so, make a change to the unpacked file and run it.
> > It gaves errors once the file is changed.
> 
> Does it still give errors if you replace the two subs with:
> 
> sub key_isValid { return 1; }
> 
> sub key_isValid_simple { return 1; }

YES, SIR. I did all. Not working. 
Have you tried it yourself, or just guessing here?
Even if I add ONE space, then delete that SPACE.
Or simply do nothing, but resave the file again. It stopped working.
Its technology is sooo advanced.

> 
> Or if you remove the calls to those subs?
> 
> > How does he do that in the file? My theory is 
> 
> You don't need a theory. The code is there for you read.
> 
> > that there is a character like "Copyright C" and text editors 
> > can not save it, so once somebody trys to change the file and 
> > re save it. The whole script will not work.
> 
> Sigh.


------------------------------

Date: Thu, 23 Sep 2004 17:33:04 +0800
From: "Fayland" <fayland@gmail.com>
Subject: how to get the true ip address when i use proxy?
Message-Id: <ciu58h$eou$1@news.yaako.com>

when i use the HTTP proxy,how can i get my true ip address if it's possible?

the code is follows:
------------
foreach ('HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'X_CLIENT_IP',
'REMOTE_ADDR', 'HTTP_VIA') {
    print "$_ => $ENV{$_}\n";
}
------------
the output(proxy is 80.59.189.28):
------------
HTTP_X_FORWARDED_FOR => 80.59.189.28
HTTP_CLIENT_IP => 80.59.189.28
X_CLIENT_IP =>
REMOTE_ADDR => 80.58.3.235
HTTP_VIA => HTTP/1.0 proxy[AC1E0B46] (Traffic-Server/5.5.1-59096 [uSc ])
------------
Thanks in advance.





------------------------------

Date: Thu, 23 Sep 2004 17:49:50 +0800
From: "Fayland" <fayland@gmail.com>
Subject: Re: how to get the true ip address when i use proxy?
Message-Id: <ciu67v$f26$1@news.yaako.com>

sorry for any interruption.
I search this group and find some answers.

"Fayland" <fayland@gmail.com> дÈëÓʼþ news:ciu58h$eou$1@news.yaako.com...
> when i use the HTTP proxy,how can i get my true ip address if it's
possible?
>
> the code is follows:
> ------------
> foreach ('HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'X_CLIENT_IP',
> 'REMOTE_ADDR', 'HTTP_VIA') {
>     print "$_ => $ENV{$_}\n";
> }
> ------------
> the output(proxy is 80.59.189.28):
> ------------
> HTTP_X_FORWARDED_FOR => 80.59.189.28
> HTTP_CLIENT_IP => 80.59.189.28
> X_CLIENT_IP =>
> REMOTE_ADDR => 80.58.3.235
> HTTP_VIA => HTTP/1.0 proxy[AC1E0B46] (Traffic-Server/5.5.1-59096 [uSc ])
> ------------
> Thanks in advance.
>
>
>




------------------------------

Date: 22 Sep 2004 16:42:11 -0700
From: andres@monroy.com (Andres Monroy-Hernandez)
Subject: Re: Modulus Operator (%)
Message-Id: <3591b31a.0409221542.5102e720@posting.google.com>

Mike, 

If you read carefully it says "given integer operands", therefore,
strictly speaking, the behaviour for non-integer operands is not
defined.

Most likely the floats get int()ed.

http://www.perldoc.com/perl5.8.0/pod/perlop.html#Multiplicative-Operators

Regards,

- Andrés Monroy-Hernández

Mike Flannigan <mikeflan@earthlink.net> wrote in message news:<4151CB14.7F04762C@earthlink.net>...
> Got an easy one here:
> 
> use strict;
> use warnings;
> 
> my $num1 = 10.564;
> my $num2 = 4;
> my $num3 = $num1 % $num2;
> 
> print "\n$num1 - $num2 - $num3\n\n";
> 
> 
> When I run that I get
> 10.564 - 4 - 2
> 
> I expected
> 10.564 - 4 - 2.564
> 
> 
> The documentation says:
> Binary ``%'' computes the modulus of two numbers. Given integer operands
> $a
> and $b: If $b is positive, then $a % $b is $a minus the largest multiple
> of
> $b that is not greater than $a.
> 
> snip
> 
> Note than when use integer is in scope, ``%'' gives you
> direct access to the modulus operator as implemented by your C compiler.
> This
> operator is not as well defined for negative operands, but it will
> execute faster.
> 
> 
> What am I not seeing in all this?
> 
> 
> Mike Flannigan


------------------------------

Date: Wed, 22 Sep 2004 23:00:36 -0400
From: Eric Amick <eric-amick@comcast.net>
Subject: Re: Modulus Operator (%)
Message-Id: <hre4l0l5tvl7g8l08a8o9bqmk26hoblp8p@4ax.com>

On Wed, 22 Sep 2004 18:56:13 GMT, Mike Flannigan
<mikeflan@earthlink.net> wrote:

>
>Got an easy one here:
>
>use strict;
>use warnings;
>
>my $num1 = 10.564;
>my $num2 = 4;
>my $num3 = $num1 % $num2;
>
>print "\n$num1 - $num2 - $num3\n\n";
>
>
>When I run that I get
>10.564 - 4 - 2
>
>I expected
>10.564 - 4 - 2.564

If you want that behavior, use fmod:

use POSIX qw(fmod);
$num3 = fmod($num1, $num2);

-- 
Eric Amick
Columbia, MD


------------------------------

Date: Wed, 22 Sep 2004 18:14:10 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: new commands written in perl
Message-Id: <etollf1c04t.fsf@wilson.emschwar>

Abigail <abigail@abigail.nl> writes:
> No. Not at all. My style doesn't "call attention". It minimizes work.

We're disputing semantics at this point, which is rarely productive.

> I use quotes for what they are, quotes. It doesn't have a meta meaning.
> They are there for the parser and nothing else.

But someone reading your code is going to likely come to the
conclusion that "" is the default, so when they hit '', they may
examine it more closely.  That's all I'm saying.

-=Eric
-- 
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
		-- Blair Houghton.


------------------------------

Date: 23 Sep 2004 08:49:43 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: new commands written in perl
Message-Id: <slrncl53h7.hv.abigail@alexandra.abigail.nl>

Eric Schwartz (emschwar@pobox.com) wrote on MMMMXLI September MCMXCIII in
<URL:news:etollf1c04t.fsf@wilson.emschwar>:
,,  Abigail <abigail@abigail.nl> writes:
,, > No. Not at all. My style doesn't "call attention". It minimizes work.
,,  
,,  We're disputing semantics at this point, which is rarely productive.
,,  
,, > I use quotes for what they are, quotes. It doesn't have a meta meaning.
,, > They are there for the parser and nothing else.
,,  
,,  But someone reading your code is going to likely come to the
,,  conclusion that "" is the default, so when they hit '', they may
,,  examine it more closely.  That's all I'm saying.


Do you do that? If you see a piece of code, are you going to inspect
the quotes, make tallies to see what is the default, and when you
encounter something that isn't the default, you're going to inspect
it more closely?

I can't begin to imagine such a behaviour. When I look at code, the
low-level parsing is done automatically, and whether I see C<"foo">
or C<'foo'>, all I think is "string".


Abigail
-- 
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
         BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'


------------------------------

Date: Wed, 22 Sep 2004 18:13:47 -0400
From: Paul Lalli <mritty@gmail.com>
Subject: Re: order a semicolon-separated data file by a value of a column
Message-Id: <cistf4$hde$1@misc-cct.server.rpi.edu>

Stefan H. originally wrote:

 > I have a text data file with some thousands of rows like those:

 > foo;bar;33ec32.34c;0_164425;12.2;old;;99;dg; ;#asa;
 > table;mouse;3c32.34c;0_164425;12.2;corner;;99;ddaw2; ;/#;
 > see;lock;33ec3erwc;5_1121;12.2;bold;;99;ddaw2; ;//;
 > ...

This is a pretty poor data file to use as an example, as the fifth 
column of each row is an identical value.

 > the records are semicolon separated and each field can contain
 > letters, digits, dots, #, / and so on. All records have the same
 > number of fields.

 > I need to order the data file by the value of the fifth column (a real
 > number). How can I do? Sorry but I'm a very beginner in perl :-(

Stefan H. later wrote:

> I tried this:
> (for simplicity I removed declarations etc)

Don't.  Declarations are important.

> open(DATAFILE, "data.csv");

Always, ('yes *always*') check the return value of open() and all other 
system calls.

> 
> while (<DATAFILE>) {
> push @not_ordered_list, $_;
> }

If you're going to read the entire file into memory anyway, you may as 
well do it it one step:

my @not_ordered_list = <DATAFILE>;

> 
> sub by_value {
> # this function is used by sort
> local @a, @b;
> 
> # put each line into a list
> @a = split /;/, $a;
> @b = split /;/, $b;

You're splitting each line of the array EVERY time sort calls this 
function.  That's bad.
> 
> #then compare the values
> $a = $a[5];
> $b = $b[5];

You originally said you wanted the data sorted by the fifth column. 
$a[5] is the sixth column.

Also, don't change the values of $a and $b within the sort function. 
They are aliases to the actual elements in the array.

> 
> $a <=> $b;
> }
> 
> open (DATA_OUT, ">ordered_data.csv");
> 
> my @ordered_list = sort by_value @not_ordered_list;
> 
> seek (DATAFILE, 0,0);
>  while (<DATAFILE>) {

Why are you re-reading from the DATAFILE?  You just put the sorted list 
of lines into @ordered_list.  The actual file never changed.
>    $,=";";   
>    @data_record = split /;/, $_;
> 
> print DATA_OUT @data_record;

so... you read each line, create an array out of the elements in the 
line (removing the ; in the process), and then print those elements to 
the new file, separating each by a semicolon?

Wouldn't it make more sense to just print the original value of $_ ?

>  }
> 
> close (DATAFILE);
> close (DATA_OUT);
> 

My suggestion would be to read each element, store each line in an array 
reference, store each reference in a larger array, sort the array by the 
fifth element of each 'inner' array, and then print the results to a new 
file:

#!/usr/bin/perl
use strict;
use warnings;
open my $DATAFILE, 'data.csv' or die "Cannot open file: $!";

my @lines; #holds all the lines of the file.

while (<$DATAFILE>) {
    push @lines, [split /;/];  #add this line's elements to the array
}

open my $DATA_OUT, '>', 'ordered_data.csv'
      or die "Cannot open file for writing: $!";

sub by_fifth {
    $a->[4] <=> $b->[4];
}

foreach (sort by_fifth @lines){
    print $DATA_OUT join (';', @{$_});
}
__END__

Paul Lalli


------------------------------

Date: 22 Sep 2004 22:17:31 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Re: order a semicolon-separated data file by a value of a column
Message-Id: <Xns956CAFE55415castleamber@130.133.1.4>

Stefan H. <stfhostf@kartos.de> wrote in 
news:6ks3l0larol8qc86d52b18euu079krgapg@4ax.com:

> I tried this:
> (for simplicity I removed declarations etc)

don't.

> open(DATAFILE, "data.csv");

*check* if this works, ie: or die ".... $!";

And ;-separated is not csv

> while (<DATAFILE>) {
> push @not_ordered_list, $_;
> }

You can read an array in one go:

@not_ordered_list = <DATAFILE>;

> sub by_value {
> # this function is used by sort
> local @a, @b;
> 
> # put each line into a list
> @a = split /;/, $a;
> @b = split /;/, $b;
> 
> #then compare the values
> $a = $a[5];
> $b = $b[5];
> 
> $a <=> $b;
> }

AFAIK no need for local. Also you do the splitting for *every* 
comparison, so O( n log n ). Better: do the splitting first, and then 
sort.

> open (DATA_OUT, ">ordered_data.csv");

check!

> my @ordered_list = sort by_value @not_ordered_list;
> 
> seek (DATAFILE, 0,0);

Huh?

>  while (<DATAFILE>) {
>    $,=";";   
>    @data_record = split /;/, $_;
> 
> print DATA_OUT @data_record;

Aargh, you read the original unsorted file in again, then split, and 
then glue the result (in a bad way IIRC)... Of course it's not sorted.

>  }
> 
> close (DATAFILE);
> close (DATA_OUT);

check and check.

> the output file is not ordered.

No, since you don't use the result, you read the unsorted version, and 
write that to your output file...

-- 
John                               MexIT: http://johnbokma.com/mexit/
                           personal page:       http://johnbokma.com/
        Experienced programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html


------------------------------

Date: Thu, 23 Sep 2004 00:38:17 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: order a semicolon-separated data file by a value of a column
Message-Id: <ZVo4d.75334$KU5.21520@edtnps89>

Stefan H. wrote:
> 
> I have a text data file with some thousands of rows like those:
> 
> foo;bar;33ec32.34c;0_164425;12.2;old;;99;dg; ;#asa;
> table;mouse;3c32.34c;0_164425;12.2;corner;;99;ddaw2; ;/#;
> see;lock;33ec3erwc;5_1121;12.2;bold;;99;ddaw2; ;//;
> ...
> 
> the records are semicolon separated and each field can contain letters,
> digits, dots, #, / and so on. All records have the same number of
> fields.
> 
> I need to order the data file by the value of the fifth column (a real
> number). How can I do? Sorry but I'm a very beginner in perl :-(

#!/usr/bin/perl
use warnings;
use strict;

my $file_in  = 'file';
my $file_out = 'sorted';

open IN,  '<', $file_in  or die "Cannot open $file_in: $!";
open OUT, '>', $file_out or die "Cannot open $file_out: $!";

print OUT map join( ';', @$_ ),
           sort { $a->[ 5 ] <=> $b->[ 5 ] }
           map [ split /;/ ],
           <IN>;

__END__



John
-- 
use Perl;
program
fulfillment


------------------------------

Date: 23 Sep 2004 02:33:01 -0700
From: notruf_1102003@yahoo.de (Gerhard M)
Subject: Re: order a semicolon-separated data file by a value of a column
Message-Id: <942c5b0d.0409230133.4b0319b3@posting.google.com>

Stefan H. <stfhostf@kartos.de> wrote in message news:<omp3l0d83du14d7kcace011ngrupkrfm3g@4ax.com>...
> Hi,
> 
> I have a text data file with some thousands of rows like those:
> 
> 
> foo;bar;33ec32.34c;0_164425;12.2;old;;99;dg; ;#asa;
> table;mouse;3c32.34c;0_164425;12.2;corner;;99;ddaw2; ;/#;
> see;lock;33ec3erwc;5_1121;12.2;bold;;99;ddaw2; ;//;
> ...
> 
> the records are semicolon separated and each field can contain letters,
> digits, dots, #, / and so on. All records have the same number of
> fields.
> 
> I need to order the data file by the value of the fifth column (a real
> number). How can I do? Sorry but I'm a very beginner in perl :-(
> 
> Thanks
> Stefan

what's the reason to write an perl-script.... simply use sort:
# sort -t\; -k5n <infile >outfile

Gerhard


------------------------------

Date: 23 Sep 2004 03:00:56 -0700
From: arjohn7681@yahoo.com (AR John)
Subject: Re: parse_html_string reports error
Message-Id: <c0e1de67.0409230200.4d66e45a@posting.google.com>

Sherm Pendley <spamtrap@dot-app.org> wrote in message 
> on line 111 of the HTML. Specifically, there's an entity that's missing 
> the ';' - i.e. "&amp" instead of "&amp;".
> 
> sherm--

Sherm Pendley,

You are right in a sense. I looked into the HTML and found there is an
"&" NOT amp. like in, <a href=" ....?test=1&v=xyz"> ...</a>

I am not sure if I am using an old version of LibXML.

AR


------------------------------

Date: Thu, 23 Sep 2004 08:49:55 +0100
From: Peter Gradwell <peter@gradwell.com>
Subject: perk 5.8.5 forking causes userland crash on FreeBSD
Message-Id: <a005l01h63kemvvi41jdvbn7gv40oj7if1@news.gradwell.net>

Hi

We have an SMTPd we have written in perl [1] which receives a large
amount of traffic and will typically have 50 concurrent threads.

To achieve this, we run a perl program which forks very nicely until
after a while, the userland environment just stops responding (no
ssh, sockets etc.) but we think the kernel keeps going (machine
pings).
- machine has to be power cycled.

We've had this problem on FreeBSD 4.8, 4.9 and 4.10-STABLE and
also on FreeBSD 5.2.1 on a range of architectures.

We have also run it with a number of versions of perl, all > 5.6, but
predominantly we are using 5.8.5 now on the default port install. [2].

We believe the problem is some sort of interaction between the way
perl forks and the FreeBSD thread library, however, because the
machines are completely dead, it is somewhat tricky to work out
exactly what the problem is. Nothing is logged by the OS, except
we see that perl crashes quite a lot with a sig11 error. 

My question really is has anyone experienced this kind of problem
before
and does anyone have any clues as to what might be causing the crash.

Our current solutions are (a) re-implement using the perl thread
libraries
rather than for or (b) try it on linux. I'd rather find out what
crashes and
fix that though.

thanks
peter

[1] We could use C I suppose, but we all understand perl, and had a
lot of
legacy mail handling logic implemented in perl already. 

[2] Output of perl -V

lon-mail-3# perl -V
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
  Platform:
    osname=freebsd, osvers=4.10-stable, archname=i386-freebsd-64int
    uname='freebsd lon-mail-3.gradwell.net 4.10-stable freebsd
4.10-stable #0: sun sep 19 18:48:57 bst 2004
root@lon-mail-3.gradwell.net:usrobjusrsrcsyslonmail3190904 i386 '
    config_args='-sde -Dprefix=/usr/local
-Darchlib=/usr/local/lib/perl5/5.8.5/mach
-Dprivlib=/usr/local/lib/perl5/5.8.5
-Dman3dir=/usr/local/lib/perl5/5.8.5/perl/man/man3
-Dman1dir=/usr/local/man/man1
-Dsitearch=/usr/local/lib/perl5/site_perl/5.8.5/mach
-Dsitelib=/usr/local/lib/perl5/site_perl/5.8.5
-Dscriptdir=/usr/local/bin
-Dsiteman3dir=/usr/local/lib/perl5/5.8.5/man/man3
-Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv
-Uinstallusrbinperl -Dcc=cc -Doptimize=-O -pipe  -Duseshrplib
-Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.5/BSDPAN" -Ud_dosuid
-Ui_gdbm -Dusethreads=n -Dusemymalloc=y -Duse64bitint'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=y, bincompat5005=undef
  Compiler:
    cc='cc', ccflags
='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.5/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-I/usr/local/include',
    optimize='-O -pipe ',
    cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.5/BSDPAN"
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-I/usr/local/include'
    ccversion='', gccversion='2.95.4 20020320 [FreeBSD]',
gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lm -lcrypt -lutil -lc
    perllibs=-lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-R/usr/local/lib/perl5/5.8.5/mach/CORE'
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_64_BIT_INT USE_LARGE_FILES
  Built under freebsd
  Compiled at Sep 19 2004 23:10:48
  @INC:
    /usr/local/lib/perl5/site_perl/5.8.5/mach
    /usr/local/lib/perl5/site_perl/5.8.5
    /usr/local/lib/perl5/site_perl/5.8.0
    /usr/local/lib/perl5/site_perl/5.005
    /usr/local/lib/perl5/site_perl
    /usr/local/lib/perl5/5.8.5/BSDPAN
    /usr/local/lib/perl5/5.8.5/mach
    /usr/local/lib/perl5/5.8.5
    .



-- 
peter gradwell. gradwell dot com Ltd. http://www.gradwell.com/
 -- engineering & hosting services for email, web and voip -- 
  -- http://www.peter.me.uk/  -- http://www.voip.org.uk/ -- 


------------------------------

Date: Thu, 23 Sep 2004 10:22:10 +0100
From: "P.R.Brady" <iss025@bangor.ac.uk>
Subject: pp --addfile query
Message-Id: <415295C2.3030404@bangor.ac.uk>

The documentation for pp suggests you can add a file in as well as the 
script with --addfile=filename
Can the script read this file?    How would it open it?
This would be super for bundling both an application and the steering 
file which defines how it operates.

Regards
Phil



------------------------------

Date: 22 Sep 2004 15:06:14 -0700
From: tnitzke@simpson.com (Tony N.)
Subject: Re: Printing an array of hash refs
Message-Id: <638483db.0409221406.1677eb02@posting.google.com>

"Paul Lalli" <mritty@gmail.com> wrote in message news:<Xuj4d.3400$Ec4.1940@trndny04>...
> "Shawn Corey" <shawn.corey@sympatico.ca> wrote in message
> news:Fbj4d.17679$pA.1240792@news20.bellglobal.com...
> > >
> > > for my $row (@rows){
> > >     print (join ("\t", sort keys %$row), "\n");
> > > }
> >
> > Isn't it?
> >
> >    print join( "\t", map { $row->{$_} } sort keys %$row ), "\n";
> 
> Ah, quite correct.  I neglected to realize the OP wanted the hash values
> rather than the hash keys.  Thanks for the correction.
> 

Thanks Paul and Shawn.  That's exactly what I was looking for.  The
first print join I'll use once for the headings (hash keys) and the
second for all of the values.

Regards,
Tony


------------------------------

Date: Thu, 23 Sep 2004 00:02:12 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Printing an array of hash refs
Message-Id: <4152125e.292436952@news.erols.com>

tnitzke@simpson.com (Tony N.) wrote:

: I'm using the following code to print an array of hash refs.  It seems
: to me there should be a more concise way to do this.  I don't like the
: trailing \t or the extra line of code to get the \n.  Any pointers
: would be appreciated.
: 
: print "$_\t" for sort keys %{$rows[0]};
: print "\n";
: 
: for my $row (@rows) {
: 	print "$row->{$_}\t" for sort keys %{$row};
: 	print "\n";
: }

    {
        local($, , $\) = ("\t", "\n");
        print sort keys %{$rows[0]};
        print @$_{sort keys %$_} for @rows;
    }



------------------------------

Date: Thu, 23 Sep 2004 12:36:22 +0800
From: Alont <end@dream.life>
Subject: Re: what module could easiely load all files to a @array from a specified   folder(and subfolders)?
Message-Id: <4153527a.14628984@130.133.1.4>

Paul Lalli <mritty@gmail.com>Wrote at Wed, 22 Sep 2004 22:30:15 -0400:
>type is the type of directory entry - 'f' means file.  If you want to 
>restrict your match to files that match only a certain name, you need 
>another step:
>
>my @array =
>   File::Finder->type('f')->name('*.txt')->in($specified_folder);
 are you sure that file::find(there haven't a modle named
"Finder")have a object?:

---------- Perl compiler ----------
Can't locate object method "type" via package "File::Find" at
E:\doc\perl\getIt.pl line 11.
Normal Termination
Output completed (0 sec consumed).
---------- Perl compiler ----------
Can't locate object method "name" via package "File::Find" at
E:\doc\perl\getIt.pl line 11.
Normal Termination
Output completed (2 sec consumed).

use File::Find; # in CPAN
my @files =
File::Find->type('f')->name('*.txt')->in($specified_folder);
foreach (@files) {
print @files;
}

-- 
      Your fault as a Government is My failure as a citizen


------------------------------

Date: Thu, 23 Sep 2004 09:45:57 GMT
From: peter@PSDT.com (Peter Scott)
Subject: Re: what module could easiely load all files to a @array from a specified   folder(and subfolders)?
Message-Id: <pXw4d.499298$gE.48196@pd7tw3no>

In article <4153527a.14628984@130.133.1.4>,
 Alont <end@dream.life> writes:
>Paul Lalli <mritty@gmail.com>Wrote at Wed, 22 Sep 2004 22:30:15 -0400:
>>type is the type of directory entry - 'f' means file.  If you want to 
>>restrict your match to files that match only a certain name, you need 
>>another step:
>>
>>my @array =
>>   File::Finder->type('f')->name('*.txt')->in($specified_folder);
> are you sure that file::find(there haven't a modle named
>"Finder")have a object?:

There is indeed a module called File::Finder, it just doesn't come
with Perl.  You have to download it from CPAN.  But it is simpler
to use than File::Find and so it is worth downloading.

Read how to use File::Finder at 
http://search.cpan.org/~merlyn/File-Finder-0.03/lib/File/Finder.pm

Installing it may be as simple as typing
        perl -MCPAN -e 'install File::Finder'
(with privileges to write to perl's installation directories)
depending on your type of machine.  If you have not done this
before you will have to answer a lot of questions; the defaults
will usually be fine.  But there are many modules on CPAN that
can make programming much easier and so it is worth doing.  If
you get stuck, see http://www.cpan.org/modules/INSTALL.html .

By the way, you are expressing yourself more clearly than many 
people with a better command of English do here.

>      Your fault as a Government is My failure as a citizen

Quite.

-- 
Peter Scott
http://www.perldebugged.com/
*** NEW *** http://www.perlmedic.com/


------------------------------

Date: Thu, 23 Sep 2004 09:02:38 +0800
From: Alont <end@dream.life>
Subject: Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
Message-Id: <4152203c.1767125@130.133.1.4>

merlyn@stonehenge.com (Randal L. Schwartz)Wrote at 22 Sep 2004
09:23:55 -0700:
>use File::Finder; # in CPAN
>my @array = File::Finder->type('f')->in($specified_folder);
>

So simple! but if I only want *.txt file list, should "type('f')"
change to "type('*.txt')" or "type('txt')"?
-- 
      Your fault as a Government is My failure as a citizen


------------------------------

Date: Thu, 23 Sep 2004 09:09:32 +0800
From: Alont <end@dream.life>
Subject: Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
Message-Id: <415320bc.1895359@130.133.1.4>

"A. Sinan Unur" <1usa@llenroc.ude.invalid>Wrote at 22 Sep 2004
18:15:36 GMT:
>Don't order people around.

sorry soory, it's not what I want describe, it's my failure in english
language, my original meaning is that I've read a lot of CPAN module,
but can't find what I want, in fact I don't want bother people here, I
know everybody have no time to answer stupid question with me, so I
carefully say "just tell me the name"------however, I know what "just"
mean since you tell me :-)

-- 
      Your fault as a Government is My failure as a citizen


------------------------------

Date: Thu, 23 Sep 2004 10:02:22 +0200
From: "Bernard El-Hagin" <bernard.el-haginDODGE_THIS@lido-tech.net>
Subject: Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
Message-Id: <Xns956D661FBBE0Delhber1lidotechnet@62.89.127.66>

"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote:

> Alont <end@dream.life> wrote in
> news:4151a17b.15044562@130.133.1.4: 
> 
>> just tell me the name of module,
> 
> Don't order people around.


Which is what you just did. And you did it *knowing* you are doing it, 
which definitely can't be said for Alont, who, which he made quite 
clear, is not a native speaker of English. Didn't that give you a clue? 


-- 
Cheers,
Bernard


------------------------------

Date: Thu, 23 Sep 2004 10:42:39 +0200
From: Tore Aursand <tore@aursand.no>
Subject: Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
Message-Id: <pan.2004.09.23.08.42.38.446799@aursand.no>

On Thu, 23 Sep 2004 00:02:27 +0800, Alont wrote:
> just tell me the name of module,

File::Find::Rule is one of my favorites;

  my @files = File::Find::Rule->file()->name( '*.txt' )->in( $directory );


-- 
Tore Aursand <tore@aursand.no>
"What we anticipate seldom occurs. What we least expected generally
 happens." (Benjamin Disraeli)


------------------------------

Date: 23 Sep 2004 02:11:39 -0700
From: notruf_1102003@yahoo.de (Gerhard M)
Subject: Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
Message-Id: <942c5b0d.0409230111.5fbd26e7@posting.google.com>

Alont <end@dream.life> wrote in message news:<4151a17b.15044562@130.133.1.4>...
> just tell me the name of module,
> my english too poor to can't understand all module help files, forgive
> me....

maybe you mean this:
perl -e '@array=<>; #your code' directory/* 

this will load all files (content of files, not filename) in directory to @array

Gerhard


------------------------------

Date: Wed, 22 Sep 2004 22:30:15 -0400
From: Paul Lalli <mritty@gmail.com>
Subject: Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
Message-Id: <citcg2$ihd$1@misc-cct.server.rpi.edu>

Alont wrote:

> merlyn@stonehenge.com (Randal L. Schwartz)Wrote at 22 Sep 2004
> 09:23:55 -0700:
> 
>>use File::Finder; # in CPAN
>>my @array = File::Finder->type('f')->in($specified_folder);
> 
> So simple! but if I only want *.txt file list, should "type('f')"
> change to "type('*.txt')" or "type('txt')"?

type is the type of directory entry - 'f' means file.  If you want to 
restrict your match to files that match only a certain name, you need 
another step:

my @array =
   File::Finder->type('f')->name('*.txt')->in($specified_folder);

Paul Lalli


------------------------------

Date: Wed, 22 Sep 2004 19:04:40 -0400
From: Eric Amick <eric-amick@comcast.net>
Subject: Re: XMLout() output causes "not well-formed (invalid token)" in XMLin()
Message-Id: <a314l01pikguttf1naue89rjtnelhn3ku2@4ax.com>

On 21 Sep 2004 17:51:49 -0700, mnemotronic@yahoo.com (pt) wrote:

>use XML::Simple;
># %List is a hash of hashes.
># Key is an IP number (stored as string, not v-string)
>XMLout(\%List, OutputFile => $Fname) or die "XMLout : $Fname" ;
>
>produces:
><opt>
>  <211.57.214.74 ProbeCount="1" LastProbe="1092087541" />
>  <204.251.212.93 ProbeCount="1" LastProbe="1095511410" />
>  <210.40.224.10 ProbeCount="1" LastProbe="1090939270" />
>  <159.226.50.10 ProbeCount="2" LastProbe="1093911681" />
>  <213.114.91.47 ProbeCount="1" LastProbe="1093988795" />
>...etc...
></opt>
>
>
>Reading it back in with:
>my $HRef = XMLin($Fname) or die "XMLin : $Fname" ;
>
>returns this error:
>Uncaught exception from user code:
>
>not well-formed (invalid token) at line 2, column 3, byte 9 at
> C:/Program Files/ActiveState/Perl/site/lib/XML/Parser.pm line 187
>        XML::Parser::parse('XML::Parser=HASH(0x1b64be8)','*XML::Simple::XML_FILE')
> called at C:/Program Files/ActiveState/Perl/site/lib/XML/Simple.pm
>line 334
>
>[snip]
>
>I'm guessing it's because my hash key looks like a number, but I can't
>find an option to have it quoted during XMLout().

Element names in XML must start with a letter, underscore, or colon, so
you'll have to change the data somehow. Maybe you could make the IP
address an attribute instead?

-- 
Eric Amick
Columbia, MD


------------------------------

Date: 22 Sep 2004 16:35:45 -0700
From: mnemotronic@yahoo.com (pt)
Subject: Re: XMLout() output causes "not well-formed (invalid token)" in XMLin()
Message-Id: <da662010.0409221535.66df35d1@posting.google.com>

Joe Smith <Joe.Smith@inwap.com> wrote in message 
> 
[snip]

> I would have expected to use something more like this:
> 
>   <opt>
>    <xx addr="211.57.214.74" ProbeCount="1" LastProbe="1092087541" />
>    <xx addr="204.251.212.93" ProbeCount="1" LastProbe="1095511410" />
>   </opt>

I guess I wasn't clear .... I'm using XMLout() to generate this file
which I figured XMLin() should be able to read, but I get the error.


------------------------------

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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


home help back first fref pref prev next nref lref last post