[12011] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5611 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 10 00:07:37 1999

Date: Sun, 9 May 99 21:00:29 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 9 May 1999     Volume: 8 Number: 5611

Today's topics:
    Re: Active Perl Newbie (Charles R. Thompson)
    Re: Activeperl Newbie <ffchopin@worldnet.att.net>
    Re: Authentication <gellyfish@gellyfish.com>
        combining data in a text delimited file dejanews@fearsome.net
    Re: control-character vars... (Juho Cederstrom)
        DBI limits sometimes nr of rows returned? <li@smart.net>
        Downloading files using a perl script <akeenan@ug.cs.usyd.edu.au>
        Executing programs with switches <ronnie@post1.com>
        File::Find non-functional when passing arguments to &wa <design@raincloud-studios.com>
    Re: File::Find non-functional when passing arguments to (Ilya Zakharevich)
    Re: Find all files regardless of extension <tchrist@mox.perl.com>
    Re: Fun with lists sstarre@my-dejanews.com
    Re: HASH references... <tchrist@mox.perl.com>
    Re: HASH references... (Marko R. Riedel)
        Help needed for Develop of online game <infoscore@yahoo.com>
    Re: Help needed for Develop of online game <ffchopin@worldnet.att.net>
    Re: Help needed for Develop of online game <gellyfish@gellyfish.com>
        Help! <sltoh@pacific.net.sg>
        Installing Perl in PWS <ayount@worldnet.att.net>
    Re: Is there a version of CDDB written in Perl? <pejmtoit@iinet.net.au>
        need a perl script? cindycrawford@my-dejanews.com
        Newbie <dragotom@mail.datanet.hu>
    Re: Newbie <ffchopin@worldnet.att.net>
    Re: Obtaining remote server time under Win32? <metcher@spider.herston.uq.edu.au>
    Re: Old Activestate perl <gellyfish@gellyfish.com>
        Perl bug in v5.005 : foreach variable uninitialized whe <steve@peachy.com>
        PLAIN <bill@microsoft.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Mon, 10 May 1999 03:53:59 GMT
From: design@raincloud-studios.com (Charles R. Thompson)
Subject: Re: Active Perl Newbie
Message-Id: <MPG.11a023a1b372d896989683@news>

In article <37363cc7@news.hamilton.net>, Bill G's News says...
> Hello.  I have just got a new computer and finally downloaded activeperl.
> The only problem is that I can't figure out how it works.  what is the path
> to perl, would it be C:\perl\binaries\perl.exe ?  Then, I save a file as
> something.pl then how do I open it to test it??
> Thanks,
> Jason Garrett

Attention passengers, we will be approaching enlightment in a matter of 
moments. If you will return your laptop screens to the upright positions 
and point your browsers to http://language.perl.com/faq/ . Thank you and 
have a nice day. 

-- 
Charles R. Thompson
RainCloud Studios
--posted with evaluation copy of MicroPlanet Gravity(PC)--
--please email if software causes problems in newsgroup--


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

Date: Sun, 9 May 1999 23:13:21 -0400
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: Activeperl Newbie
Message-Id: <7h5jb6$c2m$1@bgtnsc03.worldnet.att.net>

    Why is this message here twice?  Anyway, please do one thing before you
ever post here again: run, don't walk, to your nearest bookstore and buy
Learning Perl for Win32 (the gecko book), published by O'Reilly.  Better
yet, use the power of your newfound computer and order it from bookpool.com
or amazon.com...  Read the whole damn thing.
    While you're at it, read ALL of the Perl FAQs, which come with
ActiveState Perl, as well as all of the docs.  Go into your "start" menu, go
to Programs, then to ActivePerl - you should then see an option for Online
Documentation.  Read it all.  Every sentence.  Use it.  Love it.  Live it.
    But the first book will be the most help....  As to running your script,
try this: cd into the directory where you saved the script and type 'perl
name_of_script' without the single quotes (i.e., c:\i_saved_it_here\>perl
hello_world.pl).
    Email me with any specific questions, and I'll try and help.

Jason Simms

Bill Garrett <bgarrett@hamilton.net> wrote in message
news:37363ece@news.hamilton.net...
> Hello.  I just downloaded activeperl as I would like to write my own perl
> scripts.  What is the path to perl?  Is it C:\perl\binaries\perl.exe ?
Also,
> I have written the ever famous "Hello World" script.  How do I open it?
and
> then what do i do with it.
> Sorry for the general questions any help will be useful.  Does anyone know
> any activeperl newsgroups.
> thanks,
> Jason
>
>




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

Date: 9 May 1999 14:29:45 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Authentication
Message-Id: <7h464p$5a7$1@gellyfish.btinternet.com>

On Fri, 7 May 1999 22:25:39 -0400 Brett Croman wrote:
> 
> I have a need to authenticate logins, through an HTML form, using my Linux
> passwd system.
> 

So there I was, your honour, and the plaintiffs root password found itself
in plain text on my hard disk - I can hardly be held to blame for my
network interface being in promiscuous mode ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sun, 09 May 1999 14:15:09 GMT
From: dejanews@fearsome.net
Subject: combining data in a text delimited file
Message-Id: <7h459c$bmi$1@nnrp1.deja.com>

Hi,

I am looking for some help with a perl script I am writing, please forgive me
if this is the incorrect forum for such questions.

The part of the script that I am stuck on is reading in information from a
delimited text file and performing clculations on it. The data is read in from
the text file in the format with a pipe '|' as the delimiter;

product1|quantity2|price2
product2|quantity2|price2

I need to add up the price column of data, but I am unsure how to do this. I
presume that I have to assign variables to every element, but I am unsure. I
would prefer to read about this in some documentation rather than be provided
wih a cut-and-paste solution, since I am trying to learn perl, but I can't
find any informtion largely because I am unsure exactly of the name of what I
should be looking for- arrays? sorting? parsing? data mainpulation?

Please help. Thank you,

Dan
dejanews@fearsome.net


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Sun, 9 May 1999 07:22:34 +0300
From: cederstrom@kolumbus.REMOVE_THIS.fi (Juho Cederstrom)
Subject: Re: control-character vars...
Message-Id: <slrn7ja3ca.kk.cederstrom@vortex.cede.net>

On 8 May 1999 00:06:50 GMT, 
Andrew Allen <ada@fc.hp.com> wrote:
> perl5 -e '$a="^X"; $b="\cX"; print "$$a-$$b\n"'
> produces
> -perl5

I think that $$a is nothing, because there's a - in front of perl5. Try 

perl5 -e '$b="\cX"; print "$$b\n"'

And that'll print

perl5


Check this:

ln -s /usr/bin/perl foobar

(first, a symbolic link from perl to foobar)

Then jokuihme.pl :

--- clips ---
#!./foobar -w
$b="\cX"; print "$$b\n";
--- clips ---

Guess what that produces!

foobar

-- 
# This is a Perl script which will show the time.
use strict;my @ltime=localtime(time);my $time=$ltime[2]*3600+$ltime[1]*
60+$ltime[0];my $s=$time%60;my $m= int((($time-$s)%3600)/60);my $h=int(
($time-$m-$s) /3600);printf("The time is: %02d:%02d:%02d.\n",$h,$m,$s);



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

Date: 10 May 1999 02:30:49 GMT
From: "Vlad Podgurschi" <li@smart.net>
Subject: DBI limits sometimes nr of rows returned?
Message-Id: <01be9a8d$05fbb200$9f53b0cf@podgurschiv>

Hi:

I was trying to time a query by selecting all records from some tables:

 ...
$sth->prepare("select * from table").......
while ($sth->fetchrow_array){ .......  }

As you can see, I wasn't assigning the results to any array.
I was surprised to see that the script looped through only a small number
of records, not all of them  
( exactly 40 records for a 1.7 milion tabel and 5 records for a 127 table).

As soon as I assigned the row to an array  - ie  while
(@array=$sth->fetchrow_array) { .... } ,   the script returned all records
expected.

Is this an expected behaviour (maybe safety feature) or something else...

thank you,

vlad


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

Date: Mon, 10 May 1999 12:17:15 +1000
From: Angus Keenan <akeenan@ug.cs.usyd.edu.au>
Subject: Downloading files using a perl script
Message-Id: <373641AB.4FB35DE0@ug.cs.usyd.edu.au>

hi,
   I'm trying to write a perl script for CGI that will download a
protected file
from a server through the users browser. I think I can use CGIwrap to
change the
scripts access to that of the scripts owner and therefore be able to
access the
file but how do I download it throught the browser?
Your help will be much appreciated.
thanks

Angus



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

Date: Mon, 10 May 1999 11:30:21 +0800
From: Ronnie <ronnie@post1.com>
Subject: Executing programs with switches
Message-Id: <373652CD.DBC23D93@post1.com>

I'm trying to execute a perl program (prog2) from another perl program
(prog1). I know system() or `` or do can be used. The problem is, I want
to call prog2 with some switches (it uses the newgetopt.pl module).

When I try
	system("prog2 compulsory_argument");
it prog2 executes fine from within prog1.

But when I try
	system("prog2 -a optional_arg1 -b optional_arg2 compulsory_argument");
it gives me a "Use of uninitialised value..." message. 

When I run 
	prog2 -a optional_arg1 -b optional_arg2 compulsory_argument
on the command line, it doesn't give me any error either.

How do I go about solving this problem? TIA!


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

Date: Sun, 09 May 1999 17:27:38 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: File::Find non-functional when passing arguments to &wanted
Message-Id: <eAjZ2.1477$vP2.1085@news.rdc1.tn.home.com>

I'm reposting this because my previous post contained a code
error or two and I felt it was not complete enough to help
illustrate the problem I'm having.

I'm not sure if I've uncovered a bug in File::Find, but passing
locally scoped arguments from a sub to &wanted (or my version of)
clears the default variable in the &wanted sub, thus killing the
functionality of the module.

perldoc File::Find, Cookbook, Programming Perl have
been referenced, but none talk about passing arguments with
this module. It doesn't say you can, doesn't say you can't either.
I have not seen examples of it in any of the File::Find code
snippets I've come across so far.

I can't imagine not being able to pass arguments in this manner
because it keeps the variables scoped 'properly'... Isn't this
the 'proper' way to do this?

Before this was a library, but I've rewritten it to be a very simple
script. While find could easily have been called outside of a sub,
I wanted to keep it this way because it will be in a library and I
wanted to ensure that the functionality would remain if coded
in this manner.

FIX: When I use the keyword array outside of the subs and code the
script
to use the keywords from a larger scope File::Find behaves as it
should.
Further, in the 'larger scope' script the first file checked is '.'
and
it recurses properly. In the script below it is ' ';

currently, -w warns me of an uninitialized value in the statements
marked with # *warned. I realize this is very elementary coding, but
I'm getting into optimization after functionality.

The output of the script is...
Search Results
keyword: anemia
keyword: blood
Filename to check is
find complete
Search Complete

#!/usr/bin/perl -w

$| = 1;
print "Content-type: text/html\n\n";
&search_site("anemia blood");

print "Search Complete";

sub search_site{
  my $thekeywords = shift(@_);
  my @keyword_list = split(/\s+/,$thekeywords);

  print "Search Results<br>";

  if ($thekeywords eq "") {
    print "No Keywords were supplied in your query. Please try
again<br>";
    exit;
  }

  use File::Find;
  find(\&findkeywords(@keyword_list), "/drv1/web/sites/web6517e/");
  print "find complete<br>";
}

sub findkeywords{
  my @keywords = @_;
  my $word = "";

  # Test1 - Reveals keywords are passed, so obviously we can do that.
  foreach $word(@keywords){
    print "keyword: $word <br>";
  }

  # Test2 - Reveals default variable is blank?
  # *warned
  print "Filename to check is $_ <br>";

  # this returns to search_site because the filename is " ".
  # *warned
  return unless ((/\.shtml.*$/) || (/cgi-bin/));

  my ($curr_file) = $_;


    local $_;
    @pagelines = ();
    $pagelines = "";

    open(SEARCHFILE, "$curr_file") || die;
      @pagelines = <SEARCHFILE>;
    close (SEARCHFILE) || die;

    $pagelines = join('', @pagelines);
    $pagelines =~ s/\n/ /g;
    $pagelines =~ s/\s+/ /g;

    foreach $word(@keywords){
      if ($pagelines =~ /$word/i){
        print "keyword $word found in $curr_file<br>";
      }
    }
  }
}
# end of code

-------------------------------
CT
Apologies for offset replies and messages this week.
Tried Pine(pc), but was incredibly slow to navigate NG.
Please email if you have any insight.




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

Date: 10 May 1999 01:30:19 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: File::Find non-functional when passing arguments to &wanted
Message-Id: <7h5crb$fdb$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Charles R. Thompson
<design@raincloud-studios.com>],
who wrote in article <MPG.119fe4c6a1252a08989681@news>:

[ discussing \&findkeywords(@args) ]

> > This is almost certainly not doing what you think it may be doing.
> > You're not passing a reference to &findkeywords to File::Find::find...
> > you're calling that subroutine *once* in the context of gathering args
> > to find(), and then passing a reference to the return value of your
> > subroutine's invocation.
> > 
> > find() wants a coderef.  Not an invocation. :)
> 
> Ding!
> 
> I decided to not move my eyes from the screen until I read this enough 
> times for it to click (took six if you were curious). Ilya is correct in 
> that my lack of understanding common terminology is hurting me here. Now 
> it makes more sense than ever before! Man... that was kind of a dumb 
> thing to do now that I understand it. Of course it didn't work. :)

>  perl -wde 0
  DB<1> sub foo {12 + shift}

  DB<2> x \&foo(3)
0  SCALAR(0x20dd60)
   -> 15

I think this should be considered a bug in Perl.  \&foo(3) should at
least produce a warning.

Ilya


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

Date: 9 May 1999 21:36:15 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Find all files regardless of extension
Message-Id: <3736542f@cs.colorado.edu>

In comp.lang.perl.misc, 
    Clas <clas.karrlund@nospamemw.ericsson.se> writes:
:(remove nospam to mail)

remove nospam to post
-- 
"Everything you said about Plan 9 is wrong"
     -- Rob Pike, letting a speaker have it


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

Date: Sun, 09 May 1999 14:48:29 GMT
From: sstarre@my-dejanews.com
Subject: Re: Fun with lists
Message-Id: <7h477t$csp$1@nnrp1.deja.com>

Thanks Uri- good advice as always :)) Guess its time to break my budget and
buy the cookbook..

Hey you have a nice time in Mexico, and here's a little language tip for you
in a language I probably know better then Perl:

  "|Deme una cerveza fria por favor, ahora mismo!"

HUG,
S


In article <x7lneysx8x.fsf@home.sysarch.com>,
  Uri Guttman <uri@sysarch.com> wrote:
> >>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
>
>   LR> [Posted and a courtesy copy sent.]
>   LR> In article <3734DE84.E8E7E688@home.com> on Sun, 09 May 1999 01:03:24
>   LR> GMT, Rick Delaney <rick.delaney@home.com> says...
>   >> Larry Rosler wrote:
>   >> > From Another Larry:  Hash slices are your friend.  (See Uri Gellman's
>   >> ^^^^^^^
>   >> > recent postings.)
>   >>
>   >> Not sure if this is a private joke between you and Mr. Guttman, but for
>   >> the benefit of any looking for those recent postings,
>   >>
>   >> y/el/ut/;
>
>   LR> Uri Geller is a famous^Wnotorious Israeli magician^Wcharlatan.  The
>   LR> insulation of my brain wiring is fraying and may need to be replaced.
>
> when he was in his 15 minutes, i was asked many times if we were related
> (???) or something. i would respond, "he bends spoons, i bend minds!"
> why would having the same israeli first name and last initial make some
> connection in people's feeble brains?
>
> back to perl!
>
> tom c. also did some nice work on 'adding' hashes. there is a major
> decision if you want the old hash or new hash to override the keys.
>
> search for hpush IIR on p5p or on misc for the sub he wrote. he used a
> tight loop since he was checking for override behavior and he didn't
> want to unravel the hashes with a list context or with keys/values.
>
> here are some hash 'additions':
>
> # list unravel
>
> %h3 = (%h1, %h2)	# %h2 overrides h1
>
> %h3 = (%h2, %h1)	# %h1 overrides h2
>
> # slice override
>
> %h3 = %h1 ;
> @h3{ keys %h2 } = values %h2 ; # %h2 overrides h1. don't know which is faster.
>
> # hash append using slice
>
> @h1{ keys %h2 } = values %h2 ; # %h2 overrides h1.
>
> # hash append with no override (can't do slices here)
>
> !exists $h1{ $key } && $h1{ $key } = $val while ( $key, $val ) = each %h2 ;
>
> # same as above but using ||= (fails with old key eq '' or '0')
>
> $h1{ $key } ||= $val while ( $key, $val ) = each %h2 ;
>
> the cookbook has some of this and other hash stuff so read more there.
>
> see you all when i get back from mexico on the 18th.
>
> uri
>
> --
> Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
> uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
> Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
> The Best Search Engine on the Net -------------  http://www.northernlight.com
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 9 May 1999 21:46:47 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: HASH references...
Message-Id: <373656a7@cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    "Paul L Tomlinson" <keighvin@urjet.net> writes:
:    I have a script reading a form; a lot of the elements in this form are
:incrementally named, i.e. "desc1", "desc2", "desc3", etc...  These and their
:values (desc1=whatever) are all transferred successfully into %FORM.  

CGI.pm doesn't use %FORM.

--tom
-- 
	    Malt does more than Milton can
	    To justify God's ways to Man.


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

Date: 09 May 1999 18:22:41 +0200
From: mriedel@neuearbeit.de (Marko R. Riedel)
Subject: Re: HASH references...
Message-Id: <lzyaiyp60e.fsf@linux_sexi.neuearbeit.de>


#! /usr/bin/perl

%doobie=('not this one' => 1,
	 'nor this one' => 2,
	 'desc2' => ' and that one.',
	 'desc1' => ' that one,',
	 'now hold it right there,' => 'folks',
	 'desc0' => 'but this one,');

@gotcha=@doobie{'desc0' .. 'desc2'};

print @gotcha;


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

Date: 9 May 1999 09:23:22 -0500
From: "Joseph " <infoscore@yahoo.com>
Subject: Help needed for Develop of online game
Message-Id: <37358c4a@discussions>


Hi all.

Currently i intend to set up a website that 
enable people to do some virtual betting on 
soccer match in singapore . No cash, just 
credits.

This thing work like this.

1. first user need to register to play and 
supply password and 500 credits dollar to 
them

2. once the user have the passwd and credit, 
able to log on to the website and place bet.

3. the odds are live in the sense that when  
a numbers of people bet on team A, the rate 
when go down by a percentage and team B od 
will go up by a percentage.

4. there is  different kind of betting, 
a) win, draw  or lost, 
b) give number of score (eg, team A -1 1/2 
goal and team b + 1 1/2goal) if team a win 
by 1, team a score will be -1/2 where team b 
score will be +2 1/2. so team b win

5. keep track of the player bet and 
credit/deduct back to their acct when result 
is out.

This is my ideal and dont know is it 
possible to do it in perl programming??? I 
sincerely hope that u people here able to 
help me in this and like to promote soccer 
in singapore through this media


Thank alot.

Regards

Joseph

infoscore@yahoo.com

--Posted from EarthWeb Discussions. http://discussions.earthweb.com



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

Date: Sun, 9 May 1999 11:05:19 -0400
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: Help needed for Develop of online game
Message-Id: <7h48jt$nit$1@bgtnsc03.worldnet.att.net>

> This is my ideal and dont know is it
> possible to do it in perl programming??? I
> sincerely hope that u people here able to
> help me in this and like to promote soccer
> in singapore through this media

Right...  We Perl programmers have a tremendous vested interest in Singapore
soccer, so where do I sign up!  Seriously, though, this is not the place for
this kind of stuff.  At worst, this is a CGI question, so this would be the
wrong newsgroup anyway (the right one is
comp.infosystems.www.authoring.cgi).  But before you head over there, let me
answer the question - yes, it can be done, most likely with Perl and a
database to track everything.  If you really want to pursue this, I think
you can post job openings on www.perl.org.

Jason Simms




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

Date: 9 May 1999 14:55:34 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Help needed for Develop of online game
Message-Id: <7h47l6$5fo$1@gellyfish.btinternet.com>

On 9 May 1999 09:23:22 -0500 Joseph  wrote:
> 
> Hi all.
> 
> Currently i intend to set up a website that 
> enable people to do some virtual betting on 
> soccer match in singapore . No cash, just 
> credits.
> 

I dont want to get involved - I know what happened to Bruce Grobelaar
when he got involved in a Far Eastern Soccer syndicate ;-0

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sun, 09 May 1999 23:23:33 +0800
From: XueLUN <sltoh@pacific.net.sg>
Subject: Help!
Message-Id: <3735A875.B57F93E0@pacific.net.sg>

I am currently writing a Perl program and I get the following error
message in my error log when I run the program off the web.  (I get
internal server error anyway).

-- Start of error log --
Use of "do" to call subroutines is deprecated at
/usr/local/lib/perl5/chat2.pl line 267.
Can't locate Sys/socket.ph in @INC (did you run h2ph?) (@INC contains:
/usr/local/lib/perl5/i386-bsdos/5.00404/usr/local/lib/perl5
/usr/local/lib/perl5/site_perl/i386-bsdos /usr/local/lib/perl5/site_perl
 .) at sr/local/lib/perl5/chat2.pl
 line 9. 

-- End of error log --

When I tried modifying the program to run off the command line in the
shell, I get my desired output.  But, when I run it off the web, I get
the error.  The funny thing is, I do not get the same error with any
other CGI scripts except for this one.  I use the same way as my other
scripts to parse the form input.  There shouldn't be anything wrong with
my CGI script as I have already checked the syntaxt using -c as well as
run using -w.

Anyone out there who has come across such a problem before?

Please advise.  Thanks.

Please reply me at xuelun@ieee.org


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

Date: Sun, 9 May 1999 00:17:11 -0500
From: "DANIEL YOUNT" <ayount@worldnet.att.net>
Subject: Installing Perl in PWS
Message-Id: <7h452n$bvq$1@bgtnsc02.worldnet.att.net>

I am fairly new to Perl and have no knowledge whatsoever of sever
configuration, but what I am trying to do is learn perl on my pc with the
PWS.  I have attempted the recommended installations of Perl from various
web sites with no luck.  I am guessing that a vital but overlooked(and
obvious to anyone else) step has been left out. If anyone could help me out
I would really appreciate it.
                                                Thanks,
                                                                Daniel




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

Date: Sun, 09 May 1999 22:16:14 +0800
From: Peter duToit <pejmtoit@iinet.net.au>
Subject: Re: Is there a version of CDDB written in Perl?
Message-Id: <373598AE.C227FD38@iinet.net.au>

I wrote some VB6 code to extract the details from CDDB for my CD
collection CDDB does have the ID for each cd if youre interested i can let
u have the format of the CDDB database/files them im sure u could write
code in wahtever language to extract the details u want.
Peter duToit

bobby wrote:

> I'm looking for a way to uniquely identify audio/data cd's and think
> CDDB may be the way to go. Is there a version of CDDB written in Perl?
> (I only care about generating some unique string so I can identify the
> CD and don't really care about communicating with the cddb
> server...yet).
>
> Or is there some simply checksum type thingy I can do instead?
> Thanks!



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

Date: Sun, 09 May 1999 14:47:19 GMT
From: cindycrawford@my-dejanews.com
Subject: need a perl script?
Message-Id: <7h475n$cs8$1@nnrp1.deja.com>

need a free perl script or need a perl script installed?
check our site at http://cgi-shop.com

cindy

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Sun, 09 May 1999 17:05:09 +0200
From: Thomas Malindovszky <dragotom@mail.datanet.hu>
Subject: Newbie
Message-Id: <3735A425.13032EA2@mail.datanet.hu>

Hi!

 I'm newbie at Perl, and have some problems.
 My perl script create a html form from a database, and I want this
script to
 decode the form data.

 So how can the same script create a form, and process it over and over?

 Thanx for the help,

 Draco



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

Date: Sun, 9 May 1999 11:10:08 -0400
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: Newbie
Message-Id: <7h48t1$osb$1@bgtnsc03.worldnet.att.net>

[posted and mailed]

Thomas Malindovszky <dragotom@mail.datanet.hu> wrote in message
news:3735A425.13032EA2@mail.datanet.hu...
> Hi!
>
>  I'm newbie at Perl, and have some problems.
>  My perl script create a html form from a database, and I want this
> script to
>  decode the form data.
>
>  So how can the same script create a form, and process it over and over?
>
>  Thanx for the help,
>
>  Draco

First, some "best practices" for posting:

1.  Don't use "newbie" in the subject line.
2.  Make the subject as descriptive as possible.
3.  Post the problem code, preferrably all of it if it's not too long.
4.  Explain EXACTLY what you want to do with the script.

5.  Do none of the above until you have read and searched the docs, all the
FAQs, and have truly tried to make it work to the best of your abilities.

Jason Simms




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

Date: Mon, 10 May 1999 13:41:19 +1000
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: Obtaining remote server time under Win32?
Message-Id: <3736555F.49872188@spider.herston.uq.edu.au>

I suppose

perl -e "print (`net time` =~ / (\S+)(P\.M\.|A\.M\.)/)"

is too simple-minded?

-- 
Jaime Metcher (dedicated to showing the world what would be going
through TomC's brain if he was forced to work on Win32 - while he was
busy sharpening his letter opener for ritual disembowelment)

Greg Rowntree wrote:
> 
> I'm endeadouring to obtain the time on a remote WinNT workstation using the
> Win32 NetRemoteTOD function, but the $time_info structure comes back pretty
> empty.  Can anyone out there help?  Is there a better way?
> Thanks
> Greg
> 
> use Win32::Api;
> 
> # import remote time function
> my ($NetRemoteTod) = new Win32::API ('netapi32', 'NetRemoteTOD', [P, P], N);
> 
> # define time structure
> my ($time_info) = pack ("L6lL5", 0,0,0,0,0,0,0,0,0,0,0,0);
> 
> # get time info from remote $server
> my ($server) = '';
> 
> if (!$NetRemoteTod->Call ($server,$time_info)) {
>  # got time okay, so unpack into tod vars
>  my ($tod_elapsedt,$tod_msecs,$tod_hours,$tod_mins,$tod_secs,$tod_hunds,
>    $tod_timezone,$tod_tinterval,$tod_day,$tod_month,$tod_year,$tod_weekday)
> =
>    unpack ("L6lL5",\$time_info);
> 
>  printf "$tod_hours:$tod_minutes:$tod_secs\n";
> }


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

Date: 9 May 1999 14:23:09 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Old Activestate perl
Message-Id: <7h45od$5a3$1@gellyfish.btinternet.com>

On 8 May 1999 16:32:37 GMT Andrew Payne wrote:
> I'm being made to port a chunk of Perl from a unix machine to
> someone's NT box -- but they are stuck with running Activestate build
> 307 from the last ice-age.
> 

<Problem with foreach etc>

I have no recollection of the problem you describe - however I would
question the reasons for not upgrading to the lastest ActiveState versions:
as long as there isnt a heavy dependence on Win32::.+ modules or on some
bespoke XS code then the move shouldnt be a problem - I have done it once
and cant remember any problems.  The greatest advantage of going with
the 5\d+ builds is that they are based on the same code as the latest
stable Perl distribution - so when you discover a feature that surprises
you it is more likely that people will be able to reproduce it.  Also the
3\d+ builds were based (IIRC) on 5.003 and it is certain that there
have been bug fixes in the core functionality since then (I cant find
an old enough perldelta to be more precise I'm afraid ).

In respect of your question you might find that the answer is listed
somewhere on ActiveStates web site.

Alternatively you might want to post the smallest piece of code that
exhibits the behaviour you describe as there might be an alternative
explanation that you have overlooked.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sun, 9 May 1999 17:53:36 +0100
From: "Steve Kay" <steve@peachy.com>
Subject: Perl bug in v5.005 : foreach variable uninitialized when returned?
Message-Id: <926268544.13712.0.nnrp-07.9e983059@news.demon.co.uk>

I seem to have run into the bug below, where a foreach variable cannot be
returned from a subroutine.

Worked okay in previous perl versions (v5.004 and earlier) and I wondered
whether there's a patch for this little problem?  Bit of a hassle as it
breaks things like the vnc package (vncserver ends up always returning
$DISPLAY of ":").

Thanks,

Steve Kay
steve@peachy.com

$ cat perltest
#!/usr/bin/perl -w
sub a {
 foreach $b (1 .. 5) {
  return $b;
 }
}

$c=&a;
print "c=$c\n";
$ ./perltest
Use of uninitialized value at ./perltest line 9.
c=
$ perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
  Platform:
    osname=linux, osvers=2.0.35, archname=i386-linux-thread
    uname='linux caliban.xs4all.nl 2.0.35 #2 sat jul 18 01:37:18 cest 1998
i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=2.7.2.3
    cppflags='-D_REENTRANT -Dbool=char -DHAS_BOOL -I/usr/local/include'
    ccflags ='-D_REENTRANT -Dbool=char -DHAS_BOOL -I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Built under linux
  Compiled at Aug  9 1998 10:17:03
  @INC:
    /usr/lib/perl5/5.00502/i386-linux-thread
    /usr/lib/perl5/5.00502
    /usr/lib/perl5/site_perl/5.005/i386-linux-thread
    /usr/lib/perl5/site_perl/5.005
    .





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

Date: Sun, 09 May 1999 17:23:53 +0200
From: Bil Gat <bill@microsoft.com>
Subject: PLAIN
Message-Id: <3735A889.6B1F8B6A@microsoft.com>

hi i am a 17 year old beginner in PERL programming.

i have two questions:

-i opened a socked, i can type something and send it over
   but how can i send a string in plain text over?     like this:
"sdfgfgd fsdg dfsg", without typing it?

-how can i "print" in color withour ANSIColor.pm?

please send it to nospam.gin@dds.nl            (without nospam ofcourse)

thanks!

Bil



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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 5611
**************************************

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