[18879] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1047 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 3 11:05:46 2001

Date: Sun, 3 Jun 2001 08:05:06 -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: <991580706-v10-i1047@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 3 Jun 2001     Volume: 10 Number: 1047

Today's topics:
    Re: Flame Target (John R Ramsden)
    Re: Flame Target <comdog@panix.com>
    Re: How to filter out swearwords? Link to your site rew <Adolt_Hitler@yahoo.com>
    Re: How to filter out swearwords? Link to your site rew <pne-news-20010603@newton.digitalspace.net>
    Re: How to filter out swearwords? Link to your site rew <bowman@montana.com>
    Re: Learning perl - llama book <temp1@williamc.com>
    Re: Perl 5.6, eval, and Illegal octal digit message (Martien Verbruggen)
        To all the Newbies and Lurkers outthere <buggs-clpm@splashground.de>
    Re: To all the Newbies and Lurkers outthere <buggs-clpm@splashground.de>
    Re: To all the Newbies and Lurkers outthere (Martien Verbruggen)
    Re: To all the Newbies and Lurkers outthere <comdog@panix.com>
        TOY: explore the representation of binary floating poin <skilchen@swissonline.ch>
        using output of server program <daniel304@planet.nl>
    Re: using output of server program (Martien Verbruggen)
    Re: using output of server program <daniel304@planet.nl>
        using perl with msaccess <eng80956@nus.edu.sg>
        XML & Nested Data Structures <jdoyon@nrcan.gc.ca>
    Re: xslint <bart.lateur@skynet.be>
    Re: xslint <comdog@panix.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 03 Jun 2001 10:39:07 GMT
From: jr@redmink.demon.co.uk (John R Ramsden)
Subject: Re: Flame Target
Message-Id: <3b1a13bb.16532864@news.demon.co.uk>

brian d foy <comdog@panix.com> wrote:
>
> "Joseph André" <msoftmonkeySPAM@crosswinds.net> wrote:
> >
> > print <<END;
> > 
> > Content-Type: text/html\n\n
>
> what's that extra line doing there?

I think it has to be there. I can't check, as my O'Reilly Perl books
are at work. But I'm sure one of them mentions that most browsers
(in fact the HTML standard) demand a blank line near the start of
an HTML script, after the Content-type line if I'm not mistaken.


Cheers

---------------------------------------------------------------------------
John R Ramsden (jr@redmink.demon.co.uk)
---------------------------------------------------------------------------
The new is in the old concealed, the old is in the new revealed.
   St Augustine.
---------------------------------------------------------------------------


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

Date: Sun, 03 Jun 2001 08:07:43 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: Flame Target
Message-Id: <comdog-AC78CA.08074303062001@news.panix.com>

In article <3b1a13bb.16532864@news.demon.co.uk>, jr@redmink.demon.co.uk 
(John R Ramsden) wrote:

> brian d foy <comdog@panix.com> wrote:
> >
> > "Joseph André" <msoftmonkeySPAM@crosswinds.net> wrote:
> > >
> > > print <<END;
> > > 
> > > Content-Type: text/html\n\n

> > what's that extra line doing there?
> 
> I think it has to be there. I can't check, as my O'Reilly Perl books
> are at work.

is your web browser at work too?  

> But I'm sure one of them mentions that most browsers
> (in fact the HTML standard) demand a blank line near the start of
> an HTML script, after the Content-type line if I'm not mistaken.

you are mistaken.  it has nothing to do with HTML.  see the
HTTP specification for details.

-- 
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: Sun, 03 Jun 2001 07:48:10 GMT
From: "Adolt_Hitler" <Adolt_Hitler@yahoo.com>
Subject: Re: How to filter out swearwords? Link to your site reward!
Message-Id: <_YlS6.98022$ff.747771@news-server.bigpond.net.au>

But if a pickup line is designed with a swear word in there altering it
changes the impact.
Impact is everything in these things.

"Shabooza" <robocool69@aol.com> wrote in message
news:e635ee7.0106022304.5923a59f@posting.google.com...
> I am going to have a "submit a pick up line" section on my website,
> and i was wondering how i can make a swear word filterizer?  I want
> them to enter their pick up line idea into the text box, and they need
> to submit it, and lets say the word "ASS" is in there, well when the
> filterized version comes out, i want it to say "Butt" or "rear", and
> then they can submit the new filtered copy of it?  So...i really need
> to get this, and i would be happy to advertise a link to your site
> from my site, if you have one.
>
> Thanks,
>        Shabooza




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

Date: Sun, 03 Jun 2001 10:10:14 +0200
From: Philip Newton <pne-news-20010603@newton.digitalspace.net>
Subject: Re: How to filter out swearwords? Link to your site reward!
Message-Id: <nrrjhtcbn2djumf4lnvgolvp0jbkjlda2j@4ax.com>

On 3 Jun 2001 00:04:55 -0700, robocool69@aol.com (Shabooza) wrote:

> I am going to have a "submit a pick up line" section on my website,
> and i was wondering how i can make a swear word filterizer?

Use s/// (substitute) to replace swear words (your definition) with
whatever you want -- one space, nothing, another word.

You could use a hash, keyed on the swear word, to make it more easily
configurable.

Another possibility is Damian Conway's Regexp::Common module, which has
a regexp matching profanity that you could use in the match part of the
substitution (or use $clean = $RE{profanity}->subs($dirty, '') or
something like that). Using -keep gives you the dirty word in $1 so you
can match on that for more flexibility.

If you roll your own, make sure you recognise word boundaries correctly,
so that "assume" doesn't turn into "buttume", or "hello" into "hecko".

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.


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

Date: Sun, 3 Jun 2001 09:02:13 -0600
From: "bowman" <bowman@montana.com>
Subject: Re: How to filter out swearwords? Link to your site reward!
Message-Id: <ihsS6.537$cM3.1611@newsfeed.slurp.net>


"Shabooza" <robocool69@aol.com> wrote in message
news:e635ee7.0106022304.5923a59f@posting.google.com...
> to submit it, and lets say the word "ASS" is in there, well when the
> filterized version comes out, i want it to say "Butt" or "rear", and

you should substitute 'fanny' for 'ass' and give the Ozites a chuckle.





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

Date: Sun, 03 Jun 2001 12:45:50 GMT
From: PropART <temp1@williamc.com>
Subject: Re: Learning perl - llama book
Message-Id: <3B1A314F.D0EB6BBC@williamc.com>

Chuck wrote:
> 
> I am just starting into Perl and have the Llama book and the Camel
> book... I am totally stuck on "regular expressions" and just want to
> know if I should
> 
> a- re-read over and over and suddenly get it
> 
> b- forge ahead and hope it sinks in later
> 
> you pros and non-pros alike have thoughts on this?

From a non-expert... When I read the Llama several years ago I
remember taking at least 2 or 3 times as long on the regexp chapter
than the other intro chapters. But I pushed through and now feel
comfortable with basic regexps. When I re-read the chapter recently
looking for a good introduction to help someone learning JavaScript, I
found it clear and well-written - as long as the Unix examples don't
throw the newbie. And don't forget, some other languages are
implementing regexps very similarly to Perl. Once you know them in
Perl, you'll know them JavaScript and Java. Even VB, I hear, is adding
support for regexps in the next release.

push through and good luck, 

--williamc


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

Date: Sun, 3 Jun 2001 17:08:28 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Perl 5.6, eval, and Illegal octal digit message
Message-Id: <slrn9hjojc.tjn.mgjv@martien.heliotrope.home>

On Sun, 03 Jun 2001 07:32:55 +0100,
	Richard A Lough <ralough.ced@dnet.co.uk> wrote:
> Richard A Lough wrote:
> 
>> on some strings containing '08' I get an error message output -
>> Illegal octal digit .... etc
>> and no value returned.
>> 
> Hmmm... everybody "knows" that '044' '08' are interpreted as 
> octal values, or give error messages - but this doesn't get 
> written down. 

It may not be totally obvious to you, but it is written down.

# man perldata
[snip]
       Numeric literals are specified in any of the following
       floating point or integer formats:

           12345
           12345.67
           .23E-10             # a very small number
           4_294_967_296       # underline for legibility
           0xff                # hex
           0377                # octal
           0b011011            # binary
[snip]

# man perlnumber
[snip]
           $n = 1234;                  # decimal integer
           $n = 0b1110011;             # binary integer
           $n = 01234;                 # octal integer
           $n = 0x1234;                # hexadecimal integer
           $n = 12.34e-56;             # exponential notation
[snip]

# man perlfaq4
[snip]
       Why isn't my octal data interpreted correctly?
[snip of answer, containing references to the use of a leading 0 to
denote octal values]

The perldiag man page has several mentions of this as well, specifically
one of the umask entries (which you would have found by doing a simple
text search in that document when you were looking up what the error
message meant). The entry for umask in perfunc also mentions it. A grep
of all the pods reveals several lines peppered throughout the
documentation that explicitly say that octal numbers normally start with
a 0 (oct() will accept them without a 0).

So, it is written down in the standard documentation. The third edition
of the Camel also mentions is (didn't check the other editions).

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | This matter is best disposed of from
Commercial Dynamics Pty. Ltd.   | a great height, over water.
NSW, Australia                  | 


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

Date: Sun, 3 Jun 2001 11:00:00 +0200
From: buggs <buggs-clpm@splashground.de>
Subject: To all the Newbies and Lurkers outthere
Message-Id: <9fcuda$6oe$02$1@news.t-online.com>

Hello,
my name is Buggs.

I actually have the perception that
there are many of you outthere.

Currently you are participating
in the Perl community in a silent
non-interactive but still very valuable way.

You even fund the Perl project
by buying books and stuff
and last but not least by your ( private ) code
and spread of word and stuff.

I strongly believe that many of you would like to
participate and contribute in a more active way.
I also have the feeling that all you need is a little
more confidence and an entrance.

So I decided to start a new project.
This project is designed to *let* *you* *in*.

That is we will design and develop a program.

The story is that one day in my last job,
I was in desperate need to debug the headers
of one of our web applications.
But because it was a really good application
it had a lot of stuff to keep one from compromising
it and get the headers by telneting.
So I ripped of a short proxy script
written by Michael Schilli from
http://www.linux-magazin.de
powered it up a littled bit ( added fork()ing and stuff )
and hacked it little more to meet my conditions
and successfully debugged my headers.

Good thing is the little programm,
I called it "lil_proxy.pl", saved my job.
Sad thing is lil_proxy is a mess now.
In my deperate quest I really fucked it up.

Now that the little programm is such a mess
it desperatly needs a clean up.

So now *our* job, if you want to participate,
is to clean this little programm up and extend it.

Currenty thinking of these versions:
- one using fork()
- one using select()
- one using Tk

and if we still have fun
- one with caching

Don't be upset if you don't know
what this means, you will learn.
Actually I will make you know what this
is even when someone wakes you up
in your RMS phase. 

So if you want to participate please
send a short email to:

lilproxy-project@splashground.de

If you have fear you can use an anonymous remailer
( search for the word on google if you don't know what that is)
or force a friend to email ;-)

Disclaimer
This project will not start unless there are at least 3 participants. 

Thanks for you patience,
Buggs

-- 
"Fear leads to anger, anger leads to hate, hate.. leads to suffering.."
Yoda


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

Date: Sun, 3 Jun 2001 13:05:00 +0200
From: buggs <buggs-clpm@splashground.de>
Subject: Re: To all the Newbies and Lurkers outthere
Message-Id: <9fd5np$qs2$07$1@news.t-online.com>

Hoi,
I put a little site at
http://lilproxy.splashground.de/

There is a form over there where one
can also subscribe but I'd prefer email.

And please don't be shy
nobody expects anything from you.

Any help from regulars
is also very welcome ( and neither be shy ).


Buggs

--
"Sometimes I amaze even myself"
Han Solo
 


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

Date: Sun, 3 Jun 2001 21:46:44 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: To all the Newbies and Lurkers outthere
Message-Id: <slrn9hk8t3.tjn.mgjv@martien.heliotrope.home>

On Sun, 3 Jun 2001 11:00:00 +0200,
	buggs <buggs-clpm@splashground.de> wrote:

> Currently you are participating
> in the Perl community in a silent
> non-interactive but still very valuable way.

How do you know? Do you have cameras here? I though that the tinfoil was
supposed to protect me from that.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Think of the average person. Half of
Commercial Dynamics Pty. Ltd.   | the people out there are dumber.
NSW, Australia                  | 


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

Date: Sun, 03 Jun 2001 08:10:38 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: To all the Newbies and Lurkers outthere
Message-Id: <comdog-1A55C7.08103803062001@news.panix.com>

In article <9fcuda$6oe$02$1@news.t-online.com>, buggs 
<buggs-clpm@splashground.de> wrote:


> The story is that one day in my last job,
> I was in desperate need to debug the headers
> of one of our web applications.

> Good thing is the little programm,
> I called it "lil_proxy.pl", saved my job.
> Sad thing is lil_proxy is a mess now.
> In my deperate quest I really fucked it up.
> 
> Now that the little programm is such a mess
> it desperatly needs a clean up.
> 
> So now *our* job, if you want to participate,
> is to clean this little programm up and extend it.

why not just use cg-eye?

-- 
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: Sun, 3 Jun 2001 16:51:10 +0200
From: "Samuel Kilchenmann" <skilchen@swissonline.ch>
Subject: TOY: explore the representation of binary floating point numbers
Message-Id: <9fdj0k$3igj2$1@ID-13368.news.dfncis.de>

To explore the internal representation of binary floating-point
doubles i have written the following toy script. It shows the bits of
a double (on a little-endian machine). Then it interprets those bits
according to the IEEE-754 specification. Finally it shows the best
possible approximation of a double as a decimal fraction. And it
converts this decimal fraction back into a floating-point number with
full precision using Math::BigFloat.

The script reads arbitrary arithmetic expressions  (it eval()s the
input but it doesn't try to prevent you from entering silly things).
If you enter 0.1 it prints something like:
          S Exponent    Mantissa
          - ----------- ----------------------------------------------------
bits:     0 01111111011 1001100110011001100110011001100110011001100110011010
sign:     +
exp:      -4
mant:     1.600000000000000088817841970012523233890533447265625
expr:     +2**-4 * 1.600000000000000088817841970012523233890533447265625
input:    0.10000000000000001000
result:   0.10000000000000001000

Rational: 3602879701896397/36028797018963968
BigFloat: 0.1000000000000000055511151231257827021181583404541015625
            --------------------
            01234567890123456789

If you enter sqrt(2)**2 it prints:
          S Exponent    Mantissa
          - ----------- ----------------------------------------------------
bits:     0 10000000000 0000000000000000000000000000000000000000000000000001
sign:     +
exp:      1
mant:     1.0000000000000002220446049250313080847263336181640625
expr:     +2**1 * 1.0000000000000002220446049250313080847263336181640625
input:    2.00000000000000040000
result:   2.00000000000000040000

Rational: 4503599627370497/2251799813685248
BigFloat: 2.000000000000000444089209850062616169452667236328125
            --------------------
            01234567890123456789

etc.

Maybe this toy can help you too to explore the strange world of binary
floating-point numbers ...

------------%<----------------------------------------------
#!perl
use strict;
use Math::BigInt;
use Math::BigFloat;

$Math::BigFloat::div_scale = 100;
my $FIXED_DENOMINATOR = Math::BigInt->new("2") ** 52;
my $ZERO = Math::BigInt->new('0');
my $ONE  = Math::BigInt->new('1');
my $TWO  = Math::BigInt->new('2');

sub get_double_bits {
  my $double = shift;

  my $bits = reverse(unpack("b*", pack("d", $double)));

  my $sign = substr($bits,0,1);
  my $exp  = substr($bits,1,11);
  my $mant = substr($bits,12);

  return ($sign, $exp, $mant);
}

sub decode_double {
  my $double = shift();

  my ($sign, $exp, $mant) = get_double_bits($double);

  my $mant_dec = Math::BigFloat->new(base2dec(2, $mant));
  $mant_dec /= $FIXED_DENOMINATOR;
  $mant_dec += 1;
  $mant_dec =~ s/\.$/.0/;

  my $exp_dec;
  if ($exp == 0) {
    $exp_dec = 0;
  }
  else {
    $exp_dec = unpack("N", pack("B32", sprintf("%032s", $exp))) - 1023;
  }

  print "          S Exponent    Mantissa\n";
  print "          - ----------- ", "-" x 52, "\n";
  print "bits:     $sign $exp $mant\n";

  my $text = "";
  if ($sign) {
    $text = "-";
  } else {
    $text = "+";
  }

  print "sign:     $text\n";
  print "exp:      $exp_dec\n";
  printf("mant:     %s\n", $mant_dec);

  $text .= '2**' . $exp_dec . ' * ' . $mant_dec;

  print "expr:     ", $text, "\n";
  my $t = eval $text;
  printf("input:    %.20f\n", $double);
  printf("result:   %.20f\n", $t);
  print "\n";
}

sub base2dec {
  my $base   = shift;
  my $number = shift;

  my %value;
  @value{(0..9, 'A'..'Z')} = (0..35);
  my $ret   = $ZERO;
  my $multi = $ONE;
  $number = uc($number);
  while((my $c = chop($number)) ne "") {
     $ret   = $multi * $value{$c} + $ret;
     $multi *= $base ;
  }

  return $ret;
}

sub double2rational {
  my $double = shift;

  my ($sign, $exp, $mant) = get_double_bits($double);

  if ($exp == 0) {
    $mant = substr($mant,1) . '0';
  }
  else {
    $mant = '1' . $mant;
  }

  my $exp_dec  = Math::BigInt->new(base2dec(2, $exp));
  my $mant_dec = Math::BigInt->new(base2dec(2, $mant));

  if ($exp_dec >= 1075) {
    $exp_dec = $exp_dec - 1075;
    $mant_dec = $mant_dec * ($TWO ** $exp_dec);
    $exp_dec = $ONE;
  }
  else {
    $exp_dec = $TWO ** (1075 - $exp_dec);
  }

  my $gcd = Math::BigInt::bgcd($exp_dec, $mant_dec);
  $exp_dec  /= $gcd;
  $mant_dec /= $gcd;

  my ($numerator, $denominator);
  ($numerator   = $mant_dec) =~ s/^\+//;
  ($denominator = $exp_dec)  =~ s/^\+//;

  if ($sign) {
    $numerator = "-$numerator";
  }
  return ($numerator, $denominator);
}

sub rational2bigfloat {
  my ($num, $den) = @_;

  $num = Math::BigFloat->new($num);
  $den = Math::BigFloat->new($den);
  my $result = $num / $den;
  $result =~ s/0+$//;
  $result =~ s/^\./0./;
  $result =~ s/\.$/.0/;

  return $result;
}

while (1) {
  print "Enter expression: ";
  $_ = <>;
  last if /^$/;
  print "evaluating: $_\n";
  chomp();
  my $d = eval $_;

  decode_double($d);

  my ($num, $den) = double2rational($d);
  print "Rational: ";
  if ($den eq '1') {
    print "$num\n";
  }
  else {
    print "$num/$den\n";
  }

  my $bigfloat = rational2bigfloat($num, $den);

  print "BigFloat: ", $bigfloat, "\n";
  my $fill = " " x (1 + index($bigfloat, "."));
  print "          ", $fill, "-" x 20, "\n";
  print "          ", $fill, "0123456789" x 2, "\n";
  print "\n";
}

__END__


Please let me know if you find any errors or if you know better ways to show the
internal representation of binary floating-point doubles.







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

Date: Sun, 3 Jun 2001 09:11:09 +0200
From: "Daniel van den Oord" <daniel304@planet.nl>
Subject: using output of server program
Message-Id: <9fcnpe$7oo65$1@reader02.wxs.nl>

I want to be able to open the output of this server sided program into a
variable
http://213.10.212.105:4800/getplaylisttitle?p=angel304
anybody has any idea on this ?!?
I tried LWP and socket and just plain simple opening it as a file.
-LWP couldn't download it
-socket only got errors (couldn't open socket......)
-file returned no error but didn't do anything !!!

All ideas are welcome
sorry this is my second or third post !!!




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

Date: Sun, 3 Jun 2001 17:29:43 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: using output of server program
Message-Id: <slrn9hjpr7.tjn.mgjv@martien.heliotrope.home>

On Sun, 3 Jun 2001 09:11:09 +0200,
	Daniel van den Oord <daniel304@planet.nl> wrote:
> I want to be able to open the output of this server sided program into a
> variable
> http://213.10.212.105:4800/getplaylisttitle?p=angel304
> anybody has any idea on this ?!?
> I tried LWP

LWP will do the job,

>             and socket

If you did, and you failed, then you have a bug. Hard to tell, since you
don't show any code that we can debug.

>                        and just plain simple opening it as a file.

Well, it ain't a file, so that isn't going to work.

> -LWP couldn't download it

Yes it can. I just used lwp-request to get it. And LWP::Simple:

[Lines wrapped to fit withnin 72 characters]

$ perl -MLWP::Simple -e \
'getprint "http://213.10.212.105:4800/getplaylisttitle?p=angel304"'

Unknown Artist - Prozzak - Sucks To Be You.mp3<br>Styx - Come Sail
Away<br>Creed - Higher<br>Crazy Town - Butterfly<br>Dumonde - Never Look
Back(Tiesto Remix)<br>Cygnux X - Delibration<br>Gigi D'agostino - You
Spin Me Round<br>Gigi D'Agostino & Albertino - 1 2 3 Super<br>Safri Duo
- Played A Live Airscape Mix<br>Minima

> -socket only got errors (couldn't open socket......)
> -file returned no error but didn't do anything !!!

See above.

You did something wrong. The code you used has a bug.

You did read the documentation[1] for these things, right?

# man lwpcook
# man LWP::Simple

Martien

[1] With man or perldoc on Unix, perldoc or your favourite HTML viewer
on windows, Shuck on Mac...
-- 
Martien Verbruggen              | 
Interactive Media Division      | +++ Out of Cheese Error +++ Reinstall
Commercial Dynamics Pty. Ltd.   | Universe and Reboot +++
NSW, Australia                  | 


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

Date: Sun, 3 Jun 2001 10:47:25 +0200
From: "Daniel van den Oord" <daniel304@planet.nl>
Subject: Re: using output of server program
Message-Id: <9fctdu$7pjkf$1@reader02.wxs.nl>

Thanks I have found it !!!!
and it works thanks a lot

use LWP::Simple;

getprint("http://213.10.212.105:4800/getplaylisttitle?p=angel304");
$page = get("http://213.10.212.105:4800/getplaylisttitle?p=angel304");


"Martien Verbruggen" <mgjv@tradingpost.com.au> schreef in bericht
news:slrn9hjpr7.tjn.mgjv@martien.heliotrope.home...
> On Sun, 3 Jun 2001 09:11:09 +0200,
> Daniel van den Oord <daniel304@planet.nl> wrote:
> > I want to be able to open the output of this server sided program into a
> > variable
> > http://213.10.212.105:4800/getplaylisttitle?p=angel304
> > anybody has any idea on this ?!?
> > I tried LWP
>
> LWP will do the job,
>
> >             and socket
>
> If you did, and you failed, then you have a bug. Hard to tell, since you
> don't show any code that we can debug.
>
> >                        and just plain simple opening it as a file.
>
> Well, it ain't a file, so that isn't going to work.
>
> > -LWP couldn't download it
>
> Yes it can. I just used lwp-request to get it. And LWP::Simple:
>
> [Lines wrapped to fit withnin 72 characters]
>
> $ perl -MLWP::Simple -e \
> 'getprint "http://213.10.212.105:4800/getplaylisttitle?p=angel304"'
>
> Unknown Artist - Prozzak - Sucks To Be You.mp3<br>Styx - Come Sail
> Away<br>Creed - Higher<br>Crazy Town - Butterfly<br>Dumonde - Never Look
> Back(Tiesto Remix)<br>Cygnux X - Delibration<br>Gigi D'agostino - You
> Spin Me Round<br>Gigi D'Agostino & Albertino - 1 2 3 Super<br>Safri Duo
> - Played A Live Airscape Mix<br>Minima
>
> > -socket only got errors (couldn't open socket......)
> > -file returned no error but didn't do anything !!!
>
> See above.
>
> You did something wrong. The code you used has a bug.
>
> You did read the documentation[1] for these things, right?
>
> # man lwpcook
> # man LWP::Simple
>
> Martien
>
> [1] With man or perldoc on Unix, perldoc or your favourite HTML viewer
> on windows, Shuck on Mac...
> --
> Martien Verbruggen              |
> Interactive Media Division      | +++ Out of Cheese Error +++ Reinstall
> Commercial Dynamics Pty. Ltd.   | Universe and Reboot +++
> NSW, Australia                  |




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

Date: Sun, 3 Jun 2001 18:53:24 +0800 
From: Murlimanohar Ravi <eng80956@nus.edu.sg>
Subject: using perl with msaccess
Message-Id: <191C91BDFE8ED411B84400805FBE794C11200985@pfs21.ex.nus.edu.sg>
Keywords: "msaccess & perl"

hi all,
could anyone pls tell me whether it is possible to use perl with
msaccess? i'm running perl 5,6,1,626 on a windows nt system and i need
to able to create, read from and modify msaccess databases. is there any
indirect or direct way to do this?
i'm told taht asp can be used to deal with access databases but i don't
know asp.
would anyone have any ideas for me?
thanks.
cheers,
murli.



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

Date: Mon, 28 May 2001 16:40:06 -0400
From: "Jean-François Doyon" <jdoyon@nrcan.gc.ca>
Subject: XML & Nested Data Structures
Message-Id: <9eud36$a3h1@nrn2.NRCan.gc.ca>

Hello,

I am trying to generate some XML out of nothing structured.

The application I'm working on currently uses XML::Simple to read it's
XML-ish config file, so I've been trying to get my data into something
structured so that XMLout could output it.

Now that I have a beautiful data structure, I discover (much to my horror!)
that the module DOESN'T support recursive data structures !!!

Here is an example of such a data structure (Done with Data::Dumper):

$VAR1 = 'citeinfo';
$VAR2 = {
          'title' => 'Sask1.FH7',
          'geoform' => ''
        };
$VAR3 = 'descript';
$VAR4 = {
          'abstract' => 'A general reference map of Saskatchewan'
        };
$VAR5 = 'citation';
$VAR6 = {
          'citeinfo' => $VAR2
        };
$VAR7 = 'bounding';
$VAR8 = {
          'northbc' => '60.0000',
          'eastbc' => '-101.0000',
          'southbc' => '48.0000',
          'westbc' => '-110.0000'
        };
$VAR9 = 'idinfo';
$VAR10 = {
           'descript' => undef,
           'citation' => $VAR6,
           'spdom' => {
                        'bounding' => $VAR8
                      }
         };
$VAR11 = 'spdom';
$VAR12 = $VAR10->{'spdom'};
Use of uninitialized value at ./zserver.pl line 375
recursive data structures not supported at ./zserver.pl line 375

I also tried with references, so something like 'bounding' => $VAR8 becomes
'bounding' => \$VAR8 ... But that didn't help.

It's too bad, it seems this kind of structure is ideal for XML!

Does anybody know of either a perl Module/Package that has the same
functionality, but that supports recursive data structures, or of a way
quick and easy enough way to convert this data structure to something
non-recursive/non-referential? (That could maybe "collapse" this into a
simple structure).

The whole point of this exercise was for me to avoid having to step through
the structure and so on by hand !

Any help and/or suggestions would be greatly appreciated,

Thank you,

J.F.






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

Date: Sun, 03 Jun 2001 12:06:06 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: xslint
Message-Id: <u0akhtgjvn65jp1v61feegd4le1icmpma4@4ax.com>

Tim wrote:

>Alternatively, is there a site where I can get a zip file which installs EVERY
>module that is available on CPAN?

Your harddisk might not  be big enough to hold it all. I don't think
that all of the compressed archives would even fit onto one CD.

-- 
	Bart.


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

Date: Sun, 03 Jun 2001 08:44:12 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: xslint
Message-Id: <comdog-27EAD7.08441203062001@news.panix.com>

In article <u0akhtgjvn65jp1v61feegd4le1icmpma4@4ax.com>, Bart Lateur 
<bart.lateur@skynet.be> wrote:

> Tim wrote:
> 
> >Alternatively, is there a site where I can get a zip file which installs EVERY
> >module that is available on CPAN?

> Your harddisk might not  be big enough to hold it all. I don't think
> that all of the compressed archives would even fit onto one CD.

disks are pretty large nowadays ;)

if you want to install every module, just create a Bundle from the
module list and let CPAN.pm have at it.

-- 
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

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


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