Re: Anyone know what Perl Jaguar is coming with?

2002-08-15 Thread Chris Ball
>>> On Thu, 15 Aug 2002 19:26:39 -0400, Eric Plowe <[EMAIL PROTECTED]> said: EP> Jaquar is shipping with 5.8.0 EP> ~Eric The Mac OS X perl list (where this thread started) disagrees with you, and seems to think that it's shipping with 5.6.0 as before. How recent is your information?

Re: BEGIN statement in Perl?

2002-08-15 Thread Dharmendra Rai
hi, use of BEGIN is better because it is called by perl-run-time before ur program gets executed and if u have a large chunk of variables to be initialized in this way, it is the best way. - Get a bigger mailbox -- choose a size that fits your needs. http

static variables and sub-routines with file-scope (like C) in Perl

2002-08-15 Thread Dharmendra Rai
hi, You may declare my variables at the outermost scope of a file to hide any such identifiers from the world outside that file. This is similar to C's static variables when they are used at the file level. To do this with a subroutine requires the use of a closure (an anonymous function th

Re: BEGIN statement in Perl?

2002-08-15 Thread Randal L. Schwartz
> "John" == John W Krahn <[EMAIL PROTECTED]> writes: John> You don't need a BEGIN block, a plain block will do. .. provided you execute this block before you call the enclosed subroutine. The BEGIN is more general, because it doesn't require that. -- Randal L. Schwartz - Stonehenge Consul

Re: BEGIN statement in Perl?

2002-08-15 Thread Connie Chan
#! perl use strict; our $static = 'a,'; sub a { $static .= $static } sub b { $static .= $static } sub c { $static .= $static } sub d { $static .= $static } print a(); # a, print b(); # a,a, print c(); # a,a,a,a, print d(); # a,a,a,a,a,a,a,a, First, I would like to ask, is that a static var mea

Re: BEGIN statement in Perl?

2002-08-15 Thread John W. Krahn
Troy May wrote: > > Hello, Hello, > I just read this in a forum and I have never heard of this before. He was > having problems with a variable not holding it's value when calling it from > a sub. He wrote back and said that this is what fixed it. Can anybody > explain this to me? Here's pa

Re: "use of unitialized value" diagnostic message

2002-08-15 Thread John W. Krahn
Batch M wrote: > > Hail, Hello, > Oreilly's book says..." To suppress this warning, > assign an initial value to your variables." > > what value should I attached to: > > $content = $header_html . $1 . $footer_html; > > from: > > if($content=~m|(.*?)|si) { > $content = $he

BEGIN statement in Perl?

2002-08-15 Thread Troy May
Hello, I just read this in a forum and I have never heard of this before. He was having problems with a variable not holding it's value when calling it from a sub. He wrote back and said that this is what fixed it. Can anybody explain this to me? Here's part of his post: - What I

to slurp or not to slurp

2002-08-15 Thread Paul Tremblay
I am writing a script to convert RTF to XML, and my output looks like this: (I explain this ugliness below) text text text text text I know that is ugly to read, but I'm just point out that the tags repeat themselves. It should look like this: text text text text text In other w

"use of unitialized value" diagnostic message

2002-08-15 Thread batch m
Hail, Oreilly's book says..." To suppress this warning, assign an initial value to your variables." what value should I attached to: $content = $header_html . $1 . $footer_html; from: if($content=~m|(.*?)|si) { $content = $header_html . $1 . $footer_html; $conten

Re: Processing Special Characters in email

2002-08-15 Thread Scott Ding
I did little more study and it seems that the strings I see in the /var/mail/user is "quoted-printable" strings. I could use MIME::QuotedPrint to decode them. I will give a try. Anyway, thanks drieux !!! I can always count on your reply:) = MIME-Versio

Re: Anyone know what Perl Jaguar is coming with?

2002-08-15 Thread Eric Plowe
Jaquar is shipping with 5.8.0 ~Eric On 8/15/02 11:25 AM, "drieux" <[EMAIL PROTECTED]> wrote: > > On Thursday, August 15, 2002, at 06:55 , Kay Röpke wrote: >> On Thursday, August 15, 2002, at 03:12 PM, drieux wrote: >> >>> so all I really want to know is >>> >>> "what is the canonical orthod

RE: Finding modules . . .

2002-08-15 Thread John Almberg
# Any way to coax Apache into using perl5 to interpret my CGI scripts? Duh! Talk about beginner questions. I figured this one out on my own. All works fine, now! Thanks for all the quick and valuable feedback. -- John # -Original Message- # From: John Almberg [mailto:[EMAIL PROTECTED]]

Re: Finding modules . . .

2002-08-15 Thread Chas Owens
On Thu, 2002-08-15 at 15:39, John Almberg wrote: > Luckily this is a beginning perl list, because I'm sure this is a real > beginners question . . . > > I believe I have the Mail::Mailer module installed on my system because when > I run 'perldoc Mail::Mailer' I get the documentation. However, wh

RE: Finding modules . . .

2002-08-15 Thread John Almberg
Thanks, that worked. The path is: /usr/lib/perl5.6/site-perl/5.6.1/Mail/Mailer.pm Now here's the funny part . . . running 'perl5 test.cgi' works, but running 'perl test.cgi' yields the error. I'm guessing that these two different versions of perl search different @INC paths and Mailer.PM isn't

Re: Finding modules . . .

2002-08-15 Thread John Pitchko
Try find / -name Mailer.pm It should tell you where it is. John Pitchko Data Services Saskatchewan Government Insurance >>> "John Almberg" <[EMAIL PROTECTED]> 08/15/02 01:39pm >>> Luckily this is a beginning perl list, because I'm sure this is a real beginners question . . . I believe I have

Finding modules . . .

2002-08-15 Thread John Almberg
Luckily this is a beginning perl list, because I'm sure this is a real beginners question . . . I believe I have the Mail::Mailer module installed on my system because when I run 'perldoc Mail::Mailer' I get the documentation. However, when I try to 'use' the module, I get the following error mes

RE: possible RFC?

2002-08-15 Thread Chas Owens
On Wed, 2002-08-14 at 15:43, Nikola Janceski wrote: > Okay I understand the dynamic subroutine declarations. > but perhaps a warning should be made for -w or 'use warnings'? > > It's just to find misspelled functions. I use 'use strict' for finding > misspelled vars. > Is there nothing for findin

macPerl integration with OSX

2002-08-15 Thread drieux
On Thursday, August 15, 2002, at 11:08 , Phil Dobbin wrote: > On 15/08/2002 at 10:01, drieux, [EMAIL PROTECTED] wrote: > >> I will confess that I have not kept up with the macPerl side - and >> was concerned when I learned that it had stalled out at around >> perl 5.4(???) - correct me if I am wr

Re: undef of nested data structures

2002-08-15 Thread Kevin Meltzer
As a side note, you can play around with Devel::Peek to see how many things are referencing a variable. # perl -MDevel::Peek -e '$foo="foo";$bar=\$foo;$zog=\$foo;Dump($foo);$bar="bar";Dump($foo);print $foo;'; SV = PV(0x80f2424) at 0x810b3cc REFCNT = 3 FLAGS = (POK,pPOK) PV = 0x80f10a0 "f

Re: undef of nested data structures

2002-08-15 Thread Jenda Krynicky
From: Nikola Janceski <[EMAIL PROTECTED]> > I am wondering how undef works. > > I know that undef will undefine a variable if used like > undef($scalar); I also know that it doesn't actually free up the > memory but tells Perl that it's now available to be recycled for other > data. > > but what

RE: undef of nested data structures

2002-08-15 Thread Bob Showalter
> -Original Message- > From: Nikola Janceski [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 15, 2002 12:44 PM > To: Beginners (E-mail) > Subject: undef of nested data structures > > > I am wondering how undef works. perldoc -f undef > > I know that undef will undefine a variable

Re: Best Practices for Debugging and Error Handling in CGIScripts?

2002-08-15 Thread John Pitchko
use CGI::Carp qw(fatalsToBrowser) tail -f The 2 best tools out there! =) John Pitchko Data Services Saskatchewan Government Insurance >>> "David Simcik" <[EMAIL PROTECTED]> 08/15/02 12:21pm >>> Can anyone list some resources or methods they use for debugging (Perl) CGI scripts. How can I use

Best Practices for Debugging and Error Handling in CGI Scripts?

2002-08-15 Thread David Simcik
Can anyone list some resources or methods they use for debugging (Perl) CGI scripts. How can I use CGI::Carp most effectively? Does anyone have any recommended practices for graceful CGI error handling? Is this something that should be built in a custom module for my site? Sorry if these are "so

RE: Active State

2002-08-15 Thread Shishir K. Singh
> Looks like you got an incomplete download. >Try re-dl-ing it. I think it wouldn't have gunzipped in the first place if the file was incomplete. gzip -t ActivePerl-5.6.1.633-sun4-solaris.tar.gz returns success. But just to be on the safe side, I repeated the download/unzip process 3 times..

Re: Active State

2002-08-15 Thread drieux
On Thursday, August 15, 2002, at 08:41 , Nikola Janceski wrote: > Looks like you got an incomplete download. > Try re-dl-ing it. > >> -Original Message- >> From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] >> Sent: Thursday, August 15, 2002 11:36 AM >> To: drieux; begin begin >> Subject:

RE: writing short code to perform same?

2002-08-15 Thread Jason Meyering
School's getting started again. Maybe we should refrain from giving complete answers to questions that seem to bear the funk of academia... Just a thought. I apologise if this was a legit question. > -Original Message- > From: Connie Chan [mailto:[EMAIL PROTECTED]] > Sent: Thursday, Au

undef of nested data structures

2002-08-15 Thread Nikola Janceski
I am wondering how undef works. I know that undef will undefine a variable if used like undef($scalar); I also know that it doesn't actually free up the memory but tells Perl that it's now available to be recycled for other data. but what about nested data (ie. hashes of hashes, arrays of arrays

Re: radius parsing

2002-08-15 Thread John Pitchko
Maybe it's just me, but how can you split on commas when there are not any commas in $log_entry? John Pitchko Data Services Saskatchewan Government Insurance >>> Hernan <[EMAIL PROTECTED]> 08/15/02 10:01am >>> John,everyone: I am sorry if the post was'nt clear enough,this is the sc

Re: radius parsing

2002-08-15 Thread Hernan
John,everyone: I am sorry if the post was'nt clear enough,this is the script i am using now: and below there is a piece of the log file " julyend" #!/usr/bin/perl -w open(INFO1, "julyend") or die "unable to open logfile:$!\n"; while ( my $log_entry = ) { chomp($log_entr

RE: Active State

2002-08-15 Thread Nikola Janceski
Looks like you got an incomplete download. Try re-dl-ing it. > -Original Message- > From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 15, 2002 11:36 AM > To: drieux; begin begin > Subject: RE: Active State > > gzip -d/gunzip ActivePerl-5.6.1.633-sun4-solaris.tar

RE: Active State

2002-08-15 Thread Shishir K. Singh
> p0: which rev of Solaris are you working with? > eg: both the OS rev 5.X and the Arch - sparc XOR i386 Machine hardware: sun4u OS version: 5.8 Processor type: sparc Hardware: SUNW,Ultra-5_10 > p1: are you using gunzip to deal with unpacking them? gzip -d/gunzip

Re: Active State

2002-08-15 Thread drieux
On Thursday, August 15, 2002, at 07:31 , Shishir K. Singh wrote: [..] > I am tried to install The AS Package for Solaris on > Solaris..however..seems tat the *.gz file is not complete. Gives a > checksum error when I try to untar it. Has anyone else had the same > problem ? p0: which rev of S

Re: Anyone know what Perl Jaguar is coming with?

2002-08-15 Thread drieux
On Thursday, August 15, 2002, at 06:55 , Kay Röpke wrote: > On Thursday, August 15, 2002, at 03:12 PM, drieux wrote: > >> so all I really want to know is >> >> "what is the canonical orthodox perl way >> as executed in the canonical orthodox apple way?"[4] > > The orthodox perl

Re: Compare dates

2002-08-15 Thread Robin Norwood
"Shane Laffin" <[EMAIL PROTECTED]> writes: > Hello List, > > How do I compare two dates in the format: > > Thu Aug 15 2002 15:12:02 > > to return if one date is higher than the other. > > Does anyone have any ideas on suitable modules, most > the date modules I have

RE: Active State

2002-08-15 Thread Shishir K. Singh
> pkgadd is one of the tools used in the Solaris implementation > of the SYS V packages model. > cf man pkgadd > For my money - it would be simpler to use the pkgadd command > on a Solaris Box. >f also the regular suite of tools > pkginfo > pkgrm . > if the folks at A

Re: Active State

2002-08-15 Thread drieux
On Thursday, August 15, 2002, at 07:10 , Shishir K. Singh wrote: > I am trying to download ActivePerl5.6.1 for solaris from active states > perl's site. However there are two options..pkgadd and AS package. What > does pkgadd mean ? Which one do I need to install ? pkgadd is one of the tool

RE: Status of db insert?

2002-08-15 Thread Bob Showalter
> -Original Message- > From: Rob [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 15, 2002 10:08 AM > To: [EMAIL PROTECTED] > Subject: Status of db insert? > > > Hi, I've recently started using PostgreSQL and am trying to > load a table > from a file. The file has 4275 records in it

Active State

2002-08-15 Thread Shishir K. Singh
Hello, I am trying to download ActivePerl5.6.1 for solaris from active states perl's site. However there are two options..pkgadd and AS package. What does pkgadd mean ? Which one do I need to install ? Thanks Shishir -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

Status of db insert?

2002-08-15 Thread Rob
Hi, I've recently started using PostgreSQL and am trying to load a table from a file. The file has 4275 records in it but the database only ends up with 4241 records. When I was using the Pg module I could check the status of the insert, I imagine I can do the same using the DBI module but I don

Re: radius parsing

2002-08-15 Thread John Pitchko
Well I tested it out on one of our Unix machines and I do not get any errors. The output I get (from the provided code) is: $ ./test.pl DATE: NAS-IP-Address : So which line is 54? You did not provide all the lines of your code so I can't see the line where you are getting the error. You really

radius parsing

2002-08-15 Thread Hernan
hello people i am trying to parse a radius log with a regexp provided by rob,the regexp used to work with a cisco cdr log and i am trying to adapt it to parse a radius log. I am trying to get the NAS-IP-Address parameter but i get the following output: perl optrad.pl Argument "IP" isn't nume

Re: what's wrong

2002-08-15 Thread Priss
I have amended the first few lines, this works but I wonder if this bad... Priss while (<>) { /(\S+)/ and $seen_in_file1{$1} += 1; push @tmp, $_; } open (FILE, @tmp); while () --- Priss <[EMAIL PROTECTED]> wrote: > > > # compares lines in 2 files, shows

Re: Sending emails as html pages.

2002-08-15 Thread Jenda Krynicky
From: Joe Echavarria <[EMAIL PROTECTED]> > I have a script that it's output is a html page. How > can i send the html page exactly how it is?, the > contents like the one that is on the web server. It is > something like the emails we receive from red hat brim > , oracle and others companies.

RE: Sending emails as html pages.

2002-08-15 Thread Bob Showalter
> -Original Message- > From: Joe Echavarria [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 15, 2002 1:55 AM > To: [EMAIL PROTECTED] > Subject: Sending emails as html pages. > > > Hi there, > > I have a script that it's output is a html page. How > can i send the html page exactly

Re: RPC modules ???

2002-08-15 Thread drieux
On Wednesday, August 14, 2002, at 10:52 , Mark Goland wrote: > Hi falks, > > Does anyone know of a way I can send RPC to my server ?? http://search.cpan.org/search?mode=all&query=RPC tells me there are a variety of modules that are working in that space - so a part of the question is whether

Re: Processing Special Characters in email

2002-08-15 Thread drieux
On Wednesday, August 14, 2002, at 06:29 , Scott Ding wrote: [..] > > One issue came up with is that when an email that > contains person's name like "WaalvÂg Scott" or "Mike > ÿyvind", the perl script doesn't print them correctly, > meaning, the names is not saved in the file correctly. [..] thi

Weekly list FAQ posting

2002-08-15 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address)

Re: writing short code to perform same?

2002-08-15 Thread Connie Chan
Oops... so the OP just need this ?? I still can't read the logic, but : # perl use strict; my $line="abcdefgh"; print "Outline 1: $line\n"; for my $cut (2 .. length($line)) { my @round = $line =~ /(?=(.{$cut}))/g; print "Outline $cut: @round\n"; } Can do the same =) Rgds, Connie - Orig

Re: writing short code to perform same?

2002-08-15 Thread zentara
On Thu, 15 Aug 2002 01:40:16 -0700, [EMAIL PROTECTED] (Shivani) wrote: >how do i solve this? > >my $line="abcdefgh"; > >i want output which has 8 lines: >1st outline: abcdefgh >2nd outline:ab bc cd de ef fg gh >3nd outline:abc bcd cde def efg fgh >4th outline...so on > >please let me know the

Re: Compare dates

2002-08-15 Thread Felix Geerinckx
on Thu, 15 Aug 2002 05:05:15 GMT, Shane Laffin wrote: > How do I compare two dates in the format: > > Thu Aug 15 2002 15:12:02 > > to return if one date is higher than the other. > > Does anyone have any ideas on suitable modules, most > the date modules I have looked at do

Re: writing short code to perform same?

2002-08-15 Thread Felix Geerinckx
on Thu, 15 Aug 2002 08:40:16 GMT, Shivani wrote: > my $line="abcdefgh"; > > i want output which has 8 lines: > 1st outline: abcdefgh > 2nd outline:ab bc cd de ef fg gh > 3nd outline:abc bcd cde def efg fgh > 4th outline...so on > > please let me know the shortest code tp perform this. i can

Re: writing short code to perform same?

2002-08-15 Thread Connie Chan
> how do i solve this? > > my $line="abcdefgh"; > > i want output which has 8 lines: > 1st outline: abcdefgh > 2nd outline:ab bc cd de ef fg gh > 3nd outline:abc bcd cde def efg fgh > 4th outline...so on > But what is "so on" ? Is that the 4th line like abcd bcde, but what next? I can't re

Managing user ID and password

2002-08-15 Thread Hammill, Ian R
I'm developing a site on which it's a requirement for a user to login with user id and password to gain access. The site is running on IIS and binding to an LDAP (X500) directory where data is held. What I ideally wanted to do was use a session type variable (as can be achieved in ASP) but despite

Re: what's wrong

2002-08-15 Thread Priss
> > # compares lines in 2 files, shows set difference > > > > # call as: myprog file1 file2 > > > > while (<>) > > { > > /(\S+)/ and $seen_in_file1{$1} = +1; > > Did you mean $seen_in_file1{$1} += 1; > > When you give the diamond operator it tries to open > all you command > line args a

Re: possible RFC?

2002-08-15 Thread Daniel Gardner
Nikola Janceski wrote: > WTF doesn't perl -c check for valid subroutines/function calls? > > I can write a perlscript calling a function that doesn't exist but perl -c > will say syntax ok. > ie: > % perl -ce "nothing_here('some junk')" > -e syntax OK > > % perl -e "nothing_here('some junk')" >

writing short code to perform same?

2002-08-15 Thread Shivani
how do i solve this? my $line="abcdefgh"; i want output which has 8 lines: 1st outline: abcdefgh 2nd outline:ab bc cd de ef fg gh 3nd outline:abc bcd cde def efg fgh 4th outline...so on please let me know the shortest code tp perform this. i can run it but lot of code.. thanks! -- To uns

RE: Sending emails as html pages.

2002-08-15 Thread Timothy Johnson
Find an html page that you've received and look at the source and header. You should see a line something like: Content-type:text/html (Capitalization and spelling DO count, so double-check them). This is the key to having the recipient's mail client treat your message as an html formatted messa