simple eval $e; issue

2004-04-20 Thread JupiterHost.Net
Hello list! I have a simple thing I know I'm missing something obvious... If I have this: my $e = 'use CGI qw(url param);'; eval $e; die $@ if $@; print url(); for(param()) { print "$_\n\t" . join("\n\t", param($_));print "\n"; } I realize that it is better practice to just use CGI but as

http://www.perlmonth.com/

2004-04-20 Thread WC -Sx- Jones
Hmmm, seems like web sites are dying off as well... http://www.perlmonth.com/ -- _Sx_ http://youve-reached-the.endoftheinternet.org/ _ http://jaxpm.insecurity.org/ http://cis4dl.insecurity.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

Re: Interview Questions

2004-04-20 Thread drieux
On Apr 20, 2004, at 9:04 AM, Wiggins d Anconia wrote: [..] This has what to do with CGI? [..] Wiggins, think about the idea for a moment, what if it were you first time in the barrel as the guy who had to do the interviewing of folks who were going to be writing perl code for some portion of the

RE: Time off my 8 hours on WP XP Prof

2004-04-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
WC -Sx- Jones wrote: > Charles K. Clarkson wrote: >> Wagner, David --- Senior Programmer Analyst --- WGO >> <[EMAIL PROTECTED]> wrote: > > : 0927 PDT I get 1627 PDT. Now I can do thie my a MKS Kornshell >>> or MS command prompt. >>> >>> I have tried TZ=PDT, but this seems to have no effect.

Re: Time off my 8 hours on WP XP Prof

2004-04-20 Thread WC -Sx- Jones
Charles K. Clarkson wrote: Wagner, David --- Senior Programmer Analyst --- WGO <[EMAIL PROTECTED]> wrote: : 0927 PDT I get 1627 PDT. Now I can do thie my a MKS Kornshell : or MS command prompt. : : I have tried TZ=PDT, but this seems to have no effect. It sounds like the time zone for whatever P

RE: Time off my 8 hours on WP XP Prof

2004-04-20 Thread Charles K. Clarkson
Wagner, David --- Senior Programmer Analyst --- WGO <[EMAIL PROTECTED]> wrote: : : I have looked at machine and looked at two others (one : running xp prof and one w2k). They both come back with the : correct time. The time on the machine is correct, but for : 0927 PDT I get 1627 PDT. Now

// /^$/ /()/ /(?:)/

2004-04-20 Thread WC -Sx- Jones
I think I understand better: #! perl use strict; use warnings; my $idx; my $old; while () { $old = $_; # Save $_ s/(?:)/x/g; # Change $_ ++$idx; print "Line $idx - seen $old \t ... but is now $_" if $old =~ /(?:)/; } __DATA__ Line 3 Line 5 -- To unsubscribe, e-mail: [EMAIL PROTECTE

OT Postfix PCRE zero-width match: /(?:)/

2004-04-20 Thread WC -Sx- Jones
{I apologize for the cross posting] References: ... <[EMAIL PROTECTED]> ... <[EMAIL PROTECTED]> In-Reply-To: <[EMAIL PROTECTED]> [on Perl Beginners] Charles K. Clarkson wrote: > I'm curious. What prompted the question? [ ... proof my implementation was invalid truncated.] My corrected case: #!

RE: Win32::ODBC - Where's my data?

2004-04-20 Thread Charles K. Clarkson
Cacialli, Doug <[EMAIL PROTECTED]> wrote: : : use Win32::ODBC; : use warnings; The problem is that you are not using 'strict'. use strict; : my $DSN; : $DSN = "GILES RESEARCH FOR PERL"; You can combine those: my $DSN = "GILES RESEARCH FOR PERL"; : my $GILES_RESEARCH; : $GILES_

RE: Size checking?

2004-04-20 Thread Freimuth,Robert
Sorry if this is a double post - I got a message saying it bounced... > >> In truth, I used LWP because I was already using it in > >> another part of the program, and because I thought the > >> 'head' and 'getstore' functions would do > >> what I needed (so it was out of laziness more than anyth

Time off my 8 hours on WP XP Prof

2004-04-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I have looked at machine and looked at two others (one running xp prof and one w2k). They both come back with the correct time. The time on the machine is correct, but for 0927 PDT I get 1627 PDT. Now I can do thie my a MKS Kornshell or MS command prompt. I have tried TZ=PDT, b

RE: what is happening here

2004-04-20 Thread Charles K. Clarkson
WC -Sx- Jones <[EMAIL PROTECTED]> wrote: : : [Becuase of a recent discussion on Postfix-users list] : Would anyone like to expand/explain what, exactly, is // : matching below: The first iteration of the loop, // matches a zero-length string. Each subsequent time it matches the last successf

Random Image script has a problem

2004-04-20 Thread David Gilden
Greetings, In the following script (see below) it should be pulling images from the directory: rand_fp_imgs The debug info looks good, but when I run the script from the URL below it pulls images that I have sitting at the root level. Does anyone have any idea why this might be? Thanks, Dave (k

Win32::ODBC - Where's my data?

2004-04-20 Thread Cacialli, Doug
use Win32::ODBC; use warnings; my $DSN; $DSN = "GILES RESEARCH FOR PERL"; my $GILES_RESEARCH; $GILES_RESEARCH = new Win32::ODBC("DSN=$DSN; UID=XXX; PWD=XXX;") or

Re: what is happening here

2004-04-20 Thread Rob Dixon
Wc -Sx- Jones wrote: > > [Becuase of a recent discussion on Postfix-users list] > Would anyone like to expand/explain what, exactly, is // matching below: > > #! perl > > use strict; > use warnings; > > my $idx; > > while () { > ++$idx; print "Line $idx - seen $_" if //; > } > __DATA__ > > > L

RE: Perl File Uploading

2004-04-20 Thread Wiggins d Anconia
Please bottom post > Create a form for upload (you may also use CGI.pm to create the form) > like this: > > method="post"> > > > > > > myperl.pl > > use CGI (:standard); > > my $file = param("file_to_upload"); > my $destination = "any_name.txt"; Please look at the preferre

FW: Perl File Uploading

2004-04-20 Thread B. Fongo
Create a form for upload (you may also use CGI.pm to create the form) like this: myperl.pl use CGI (:standard); my $file = param("file_to_upload"); my $destination = "any_name.txt"; # Open a file handle to write the upload file. Open (FH, ">/path/$destination"); while (<$file>)

RE: Perl File Uploading

2004-04-20 Thread B. Fongo
Create a form for upload (you may also use CGI.pm to create the form) like this: myperl.pl use CGI (:standard); my $file = param("file_to_upload"); my $destination = "any_name.txt"; # Open a file handle to write the upload file. Open (FH, ">/path/$destination"); while (<$file

RE: Please help!

2004-04-20 Thread Bob Showalter
Jason Dusek wrote: > I have code that looks like this: > ... > my $funk = '/home/jdd/sbin/idlwave2outline.pl'; > my $jam = '/home/jdd/sbin/outline2html.pl -p -t'; > my $web_dir = '/home/jdd/www'; > ... > sub makedocs { > $code = $File::Find::name; > $name = $web_dir.'/'.$_; > system(

Re: Please help!

2004-04-20 Thread Jason Dusek
Wiggins d Anconia wrote: Backticks, qx(), but then it is usually discouraged, why call a program written in the same language by shelling out? I think it's silly too, but I honestly don't know any better. So I looked up perlipc, and it's given me alot to think about but it hasn't exactly narrow

what is happening here

2004-04-20 Thread WC -Sx- Jones
[Becuase of a recent discussion on Postfix-users list] Would anyone like to expand/explain what, exactly, is // matching below: #! perl use strict; use warnings; my $idx; while () { ++$idx; print "Line $idx - seen $_" if //; } __DATA__ Line 3 Line 5 Thx/Bill -- _Sx_ http://youve-reached-th

RE: creating a hash out of 2 arrays

2004-04-20 Thread Sanyal, Dibya F \(Corporate, consultant\)
Sanyal, Dibya F (Corporate, consultant) <[EMAIL PROTECTED]> wrote: >: >: I have 2 arrays. One holds all uniq key values of an >: associative list (all ssn), other holds the associated >: values (their names). I need to create a hash by >: putting these arrays together. Each entry in that hash >: w

RE: creating a hash out of 2 arrays

2004-04-20 Thread Bob Showalter
Sanyal, Dibya F (Corporate, consultant) wrote: > Hi, > > I have 2 arrays. One holds all uniq key values of an associative list > (all ssn), other holds the associated values (their names). I need to > create a hash by putting these arrays together. Each entry in that > hash would be (ssn => name).

Re: creating a hash out of 2 arrays

2004-04-20 Thread James Edward Gray II
On Apr 20, 2004, at 9:27 AM, Sanyal, Dibya F ((Corporate, consultant)) wrote: Hi, I have 2 arrays. One holds all uniq key values of an associative list (all ssn), other holds the associated values (their names). I need to create a hash by putting these arrays together. Each entry in that hash

RE: creating a hash out of 2 arrays

2004-04-20 Thread Charles K. Clarkson
Sanyal, Dibya F (Corporate, consultant) <[EMAIL PROTECTED]> wrote: : : I have 2 arrays. One holds all uniq key values of an : associative list (all ssn), other holds the associated : values (their names). I need to create a hash by : putting these arrays together. Each entry in that hash : would be

Re: Perl File Uploading

2004-04-20 Thread Wiggins d Anconia
> > All, > > I am a total n00b to perl and have decided to write my own file upload > script for a task I have to do. It is my intention to use CGI to accomplish > to allow users to upload a file through a webpage. I do not quite understand > the process, and thought it would be similar to the p

creating a hash out of 2 arrays

2004-04-20 Thread Sanyal, Dibya F \(Corporate, consultant\)
Hi, I have 2 arrays. One holds all uniq key values of an associative list (all ssn), other holds the associated values (their names). I need to create a hash by putting these arrays together. Each entry in that hash would be (ssn => name). I can iterate over one array and create the hash. Is t

Perl File Uploading

2004-04-20 Thread John Pretti
All, I am a total n00b to perl and have decided to write my own file upload script for a task I have to do. It is my intention to use CGI to accomplish to allow users to upload a file through a webpage. I do not quite understand the process, and thought it would be similar to the php function cop

Re: perl +sendmail

2004-04-20 Thread WC -Sx- Jones
deny wrote: ok i am installing postfix and all works fine in my script to sending data just a problem i want to receive my mail from my domain-name what pop soft easy to configure can i use ? pop3, movemail (Mozilla), imap - you have many options -- but this is now best asked on the postfix-user

Re: Singleton logger

2004-04-20 Thread Wiggins d Anconia
> Hi > > I need a GL::Logger wich implements Class::Singleton > to be a singleton and Log::Log4perl to can log amy > message into a file. Here is the module source: > - > package GL::Logger; > > use Class::Singleton; > use

RE: Test For Dupplicate elements in an array

2004-04-20 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > I need to test if an array holds duplicates, and if so do something. If you just need to check for the presence of a duplicate, something like this will do the trick: sub has_dup { my %seen; $seen{$_}++ && return 1 for @_; } Of course, all the hash-based methods depe

Re: perl book

2004-04-20 Thread Randy W. Sims
Prem Vilas Fortran M. Rara wrote: any online version? There are some online books and other resources at . Regards, Randy. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: perl book

2004-04-20 Thread James Edward Gray II
On Apr 20, 2004, at 5:52 AM, Prem Vilas Fortran M. Rara wrote: i am looking for a very good perl book. what can you recommend? thank you. This is an FAQ. On a system with Perl installed, you can probably read the response by feeding the command line: perldoc -q books James -- To unsubscribe,

Re: perl book

2004-04-20 Thread james
Prem Vilas Fortran M. Rara wrote: i am looking for a very good perl book. what can you recommend? thank you. prem = [Prem's blog] http://www.premrara.com __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos

Re: perl book

2004-04-20 Thread james
Prem Vilas Fortran M. Rara wrote: i am looking for a very good perl book. what can you recommend? thank you. prem = [Prem's blog] http://www.premrara.com __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos

Singleton logger

2004-04-20 Thread Graf László
Hi I need a GL::Logger wich implements Class::Singleton to be a singleton and Log::Log4perl to can log amy message into a file. Here is the module source: - package GL::Logger; use Class::Singleton; use vars qw( $ERROR ); @ISA

Re: perl book

2004-04-20 Thread Gabriel Striewe
You could try O'Reilly's Safari at http://safari.oreilly.com/?x=1&mode=section&sortKey=title&sortOrder=asc&view=&xmlid=0-596-00027-8/copyright&open=false&g=&catid=&s=1&b=1&f=1&t=1&c=1&u=1&r=&o=1 but you need to subsribe to it (they do offer a trial). Apart from that, I do not know about other o

Re: perl book

2004-04-20 Thread Gabriel Striewe
*"Programming Perl" by Larry Wall (the author of Perl himself), Tom Christiansen and Jon Orwant Regards Gabriel http://www.amazon.com/exec/obidos/tg/detail/-/0596000278/qid=1082459072/sr=8-1/ref=pd_ka_1/102-7371199-7172966?v=glance&s=books&n=507846 On Tue, Apr 20, 2004 at 03:52:01AM -0700, Pr

Re: Test For Dupplicate elements in an array

2004-04-20 Thread Jeff 'japhy' Pinyan
On Apr 20, [EMAIL PROTECTED] said: >I need to test if an array holds duplicates, and if so do something. > >What is the slickest way of doing this ? The documentation offers a couple ways; the most common idiom uses a hash, as other people have shown. However, you can leave the hard work to Perl

Re: perl +sendmail

2004-04-20 Thread deny
If sendmail is too complex to install/operate maybe you should try http://www.postfix.org/ f ok i am installing postfix and all works fine in my script to sending data just a problem i want to receive my mail from my domain-name what pop soft easy to configure can i use ? thanks -- To uns

Re: perl book

2004-04-20 Thread David Dorward
On 20 Apr 2004, at 12:10, Prem Vilas Fortran M. Rara wrote: --- Gabriel Striewe <[EMAIL PROTECTED]> wrote: *"Programming Perl" by Larry Wall (the author of Perl himself), Tom Christiansen and Jon Orwant any online version? , which also has Learning Perl. -- David Dorwar

Re: perl book

2004-04-20 Thread Prem Vilas Fortran M. Rara
any online version? prem --- Gabriel Striewe <[EMAIL PROTECTED]> wrote: > *"Programming Perl" by Larry Wall (the author of > Perl himself), Tom > Christiansen and Jon Orwant > > Regards > > Gabriel = [Prem's blog] http://www.premrara.com ___

perl book

2004-04-20 Thread Prem Vilas Fortran M. Rara
i am looking for a very good perl book. what can you recommend? thank you. prem = [Prem's blog] http://www.premrara.com __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash

RE: Test For Dupplicate elements in an array

2004-04-20 Thread Thomas Bätzler
<[EMAIL PROTECTED]> asked: > I need to test if an array holds duplicates, and if so do something. Try use strict; use warnings; my @array = qw(foo baz bar foo); my %have; foreach my $item (@array){ warn "duplicate item $item" if exists $have{$i

Test For Dupplicate elements in an array

2004-04-20 Thread neill . taylor
I need to test if an array holds duplicates, and if so do something. What is the slickest way of doing this ? Neill __ Broadband from an unbeatable £15.99! http://www.tiscali.co.uk/products/broadband/home.html?code=SM-NL-11AM -- To unsubscri

RE: Size checking?

2004-04-20 Thread Freimuth,Robert
> > > I have a perl script that FTPs a file down from another server > > [snip] > > > I am not sure HOW to do the file size check. > > > > I wrote the following using the LWP::Simple module: > > > > print "beginning download of ", ftp_file_size( $ftp_path_gz ), "\n"; > > > > $status = download_f