Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
-- Derek B. Smith [EMAIL PROTECTED] wrote: --- Derek B. Smith [EMAIL PROTECTED] wrote: I need to substitute a conversion using chr, but have failed on multiple attempts. Basically if the first element contains a # then convert it. Will anyone advise? thank you derek

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
--- Mumia W. [EMAIL PROTECTED] wrote: On 09/28/2006 08:16 AM, Derek B. Smith wrote: --- Derek B. Smith [EMAIL PROTECTED] wrote: I need to substitute a conversion using chr, but have failed on multiple attempts. Basically if the first element contains a # then convert

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
--- Mumia W. [EMAIL PROTECTED] wrote: On 09/28/2006 12:04 PM, Derek B. Smith wrote: ** The input data is a 6 character randomized string that could start with a # such as 6FhJ9Z. If it does start with a number then I need to convert

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
Why not just specify a non-digit for the first character: my @a = ( 0 .. 9, 'a' .. 'z', 'A' .. 'Z'); my $password = join '', $a[ 10 + rand( @a - 10 ) ], map $a[ rand @a ], 1 .. 5; John Ok great, but I do not fully understand this. Will you explain in English? thx

interpoliation within regexp

2006-09-27 Thread Derek B. Smith
I need to substitute a conversion using chr, but have failed on multiple attempts. Basically if the first element contains a # then convert it. Will anyone advise? thank you derek #if first char is a-z then print it else warn #chop string into individual characters my @chars = unpack (A1 x

Re: transition to Perl developer

2006-09-20 Thread Derek B. Smith
-- JupiterHost.Net [EMAIL PROTECTED] wrote: I'm not sure what Derek is looking for, either, but have a look at: * bestpractical.com/rt/ An open-source request/bug/job tracker, which is also used as part of the CPAN projcet: rt.cpan.org * www.cpanforum.com Open-source Perl

RE: transition to Perl developer

2006-09-19 Thread Derek B. Smith
| Regents St | London W1 1AA | UK * 020 776 50849 * lee(at)server-sidesystems.ltd.uk -Original Message- From: Derek B. Smith [mailto:[EMAIL PROTECTED] Sent: 18 September 2006 20:38 To: Perl List Subject: transition to Perl developer To the Gurus, I am in the process

RE: transition to Perl developer

2006-09-19 Thread Derek B. Smith
--- Lee Goddard [EMAIL PROTECTED] wrote: --- Derek B. Smith [mailto:[EMAIL PROTECTED] wrote: --- Lee Goddard [EMAIL PROTECTED] wrote: Most of the docs you'll ever need are in perldoc Perldoc perl Perldoc perltoc Table of contents perlboot

RE: [perl #40345] splice question

2006-09-19 Thread Derek B. Smith
And why would this be? Becasue it does not load the entire data set at once or aka one at a time? If you really need to do this in place due to memory constraints, I would advise to run the iteration from back to front, i.e. foreach my $indx (reverse 0..$#$ref_array)

Re: transition to Perl developer

2006-09-19 Thread Derek B. Smith
--- JupiterHost.Net [EMAIL PROTECTED] wrote: Derek B. Smith wrote: Is there a Perl open source project currently underway wherein anyone can contribute by writing code for the projects completion such as Jbilling? Jbilling is an Derek, reread that. That question makes no sense

transition to Perl developer

2006-09-18 Thread Derek B. Smith
To the Gurus, I am in the process of making a transition over to a Perl Developer. From a knowledge standpoint, is there anything I should know or need to know. For example I do not know OO that much. What about any specific modules that are useful? Any other advice? thank you derek

Archive::Zip and hash issues

2006-09-14 Thread Derek B. Smith
, 'bpjava\-usvc'= 25, ) Finally I have created a subroutine called zipit that uses Archive::Zip. I need to pass into this routine all the absolute path names (which includes the file 2 b zipped), but I am getting the raw hash data returned. archive zip call: Archive::Zip::DirectoryMember=HASH

Re: Archive::Zip and hash issues

2006-09-14 Thread Derek B. Smith
--- Tom Phoenix [EMAIL PROTECTED] wrote: On 9/14/06, Derek B. Smith [EMAIL PROTECTED] wrote: my %subdir_for = ( 'bpjava\-msvc' = 23, 'bpjava\-susvc' = 24, 'bpjava\-usvc'= 25, ) Those backslashes aren't doing anything. But they aren't needed, either; hyphen isn't

Re: Archive Zip

2006-09-12 Thread Derek B. Smith
--- Tom Phoenix [EMAIL PROTECTED] wrote: On 9/11/06, Derek B. Smith [EMAIL PROTECTED] wrote: I need to compress a bunch of files, so instead of making a system call to gzip I figured to try out Archive::Zip. After running this code it creates a new file but is larger in size

Re: Archive Zip

2006-09-12 Thread Derek B. Smith
--- Rob Dixon [EMAIL PROTECTED] wrote: Derek B. Smith wrote: --- Tom Phoenix [EMAIL PROTECTED] wrote: On 9/11/06, Derek B. Smith [EMAIL PROTECTED] wrote: I need to compress a bunch of files, so instead of making a system call to gzip I figured to try out Archive::Zip. After running

Archive Zip

2006-09-11 Thread Derek B. Smith
I need to compress a bunch of files, so instead of making a system call to gzip I figured to try out Archive::Zip. After running this code it creates a new file but is larger in size. How do I use archive zip to simply zip files so that they are generally smaller in size? thank you derek

general subroutine question

2006-08-30 Thread Derek B. Smith
All, Is there a commonly known way or method to limit the number of arguments that a subroutine can store or pass? thank you derek __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- To

Re: general subroutine question

2006-08-30 Thread Derek B. Smith
store where? or pass? pass to what? Did you mean: Is there a way for a subroutine to react to a call with to many arguments? sub accept_max_5_arguments { die 'too many arguments!' if @_ 5; } sub accept_max_x_arguments { # apart from the first my $maxargs=shift;

Re: general subroutine question

2006-08-30 Thread Derek B. Smith
--- D. Bolliger [EMAIL PROTECTED] wrote: Derek B. Smith am Mittwoch, 30. August 2006 20:44: store where? or pass? pass to what? Did you mean: Is there a way for a subroutine to react to a call with to many arguments? sub accept_max_5_arguments { die 'too

Re: hash lookup table

2006-08-29 Thread Derek B. Smith
# This might come closer to what you want. foreach my $log (@NBlogs2) { if ($log =~ m{([[:alpha:]]+)/log.\d+}) { my $word = $1; my $number = $subdir_for{$word}; qx(echo cp $log $oldir/$number); } }

hash lookup table

2006-08-28 Thread Derek B. Smith
All, I am trying to run logic that will copy/delete 3 versions of log.\d+ files to their respective directories. Because there are so many directories, I have built a hash table instead of using a bunch of if else conditions with reg exps. My problem is it is not returning the words_num

Re: odd variable result

2006-08-28 Thread Derek B. Smith
try this syntax: my $test = system (/usr/bin/snmpget -v1 10.1.11.18 -c secret .1.3.6.1.4.1.710.7.1.5.1.23.1.13.1|awk '{print $4}'); or my $test = qx(you command above w/no quotes needed); or open (SNMP, snmpget -v1 10.1.11.18 -c secret .1.3.6.1.4.1.710.7.1.5.1.23.1.13.1 ) or die failed

Re: hash lookup table

2006-08-28 Thread Derek B. Smith
--- John W. Krahn [EMAIL PROTECTED] wrote: Derek B. Smith wrote: All, Hello, I am trying to run logic that will copy/delete 3 versions of log.\d+ files to their respective directories. Because there are so many directories, I have built a hash table instead of using a bunch

hash look up table for rolling logs

2006-08-25 Thread Derek B. Smith
All, I am trying to run logic that will copy/delete 3 versions of log.\d+ files to their respective directories. Because there are so many directories, I have built a hash table instead of using a bunch of if else conditions with reg exps. My problem is it is not returning the words_num

Re: Intersection for each pair of arrays

2006-08-23 Thread Derek B. Smith
From the previous emails, I do not understand what parts of this code is doing and why is this practical? The part is $union{$e} = 1 and $isect{$e} = 1 . Also %count is never used. thank you derek use warnings; @a = (1, 3, 5, 6, 7, 8); @b = (2, 3, 5, 7, 9); @union = @intersect= (); %union

RE: File Copy

2006-08-22 Thread Derek B. Smith
Apparently I can no longer send email to this list from my work account because of: The following message to beginners@perl.org was undeliverable. The reason for the problem: 5.1.0 - Unknown address error 550-'Mail from cardinal.com rejected because it does not accept bounces. This violates RFC

Re: Header (Location)

2006-08-09 Thread WCJ d/b/a http://ccsh.us/
On 8/9/06, Umar Draz [EMAIL PROTECTED] wrote: Please give me the link where i can read about that http://www.w3.org/Protocols/ http://www.ietf.org/rfc/rfc2616.txt http://search.cpan.org/perldoc?HTTP::Response http://www.anomaly.org/wade/projects/httptest/HTTPtest.html

Re: Header (Location)

2006-08-09 Thread WCJ d/b/a http://ccsh.us/
On 8/9/06, Umar Draz [EMAIL PROTECTED] wrote: Please give me the link where i can read about that You can see a HTTP Response Code summary here: http://dw.ccsh.us/doku.php?id=http -- WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/ -- To unsubscribe, e-mail: [EMAIL

Re: Header (Location)

2006-08-07 Thread WCJ d/b/a http://ccsh.us/
On 8/7/06, Umar Draz [EMAIL PROTECTED] wrote: In PHP i can use header (Location: this.php?error=this_error); Location: is standard HTTP. The trick is too make sure your application is truly talking HTTP. Please help me how i can use in Perl? In Perl, as a 'HereDoc' syntax -

Re: install DBD::mysql, can't execute mysql_config

2006-08-07 Thread WCJ d/b/a http://ccsh.us/
On 8/3/06, zhihua li [EMAIL PROTECTED] wrote: but anyway, the make file of DBD::mysql couldn't execute the mysql_config. does anyone have a clue about this? For some solutions to try see: http://lists.mysql.com/perl/3927 -- WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

Re: Web page manipulation

2006-08-03 Thread WCJ d/b/a http://ccsh.us/
On 8/3/06, Eric Krause [EMAIL PROTECTED] wrote: I am new to perl and I am trying to write a script that will allow me to automate some tasks that I do every day on the same web pages. Can anyone give me some quick examples to get web page data and pass data back to the pages? Look up

Re: validating SSHA pasword

2006-08-01 Thread WCJ d/b/a http://ccsh.us/
On 8/1/06, Beast [EMAIL PROTECTED] wrote: Using Digest::MD5 i could simply using eq to validating user password, but how do I validate SSHA since encrypted results are always different? Technicaly speaking a one-way hash is by definition one-way; however have you read this:

Re: Major Applications of Perl

2006-07-31 Thread WCJ d/b/a http://ccsh.us/
On 7/31/06, Sastry [EMAIL PROTECTED] wrote: Are there any other major applications using Perl and exploiting the features of Perl? There are many applications written in perl that are simply not advertised at - http://www.oreillynet.com/pub/a/oreilly/perl/news/success_stories.html The below

Re: submit fails for no apparent reason

2006-07-21 Thread WCJ d/b/a http://ccsh.us/
On 7/20/06, Mary Anderson [EMAIL PROTECTED] wrote: For several months now I have been working with cgi scripts following the following code pattern. They worked just fine until now. I am running this under UNIX. Suddenly my code refuses to work. I run the program, the initial screen shows

Re: strip

2006-07-15 Thread WCJ d/b/a http://ccsh.us/
On 7/14/06, Rob Dixon [EMAIL PROTECTED] wrote: John W. Krahn wrote: s/_.*\././; Sometimes Perl regexes start to look like ASCII art! Thats why this format would be easier on the eyes: s|_.*\.|.|; -- WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/ -- To unsubscribe,

Re: how to add a list of numbers

2006-07-15 Thread WCJ d/b/a http://ccsh.us/
On 7/15/06, I BioKid [EMAIL PROTECTED] wrote: is there any shortest way to add a list of random numbers ? for example : 11 1 250 39 100 my $results; while(DATA){ s|\s+||g; $results += $_; } print $results; __END__ 11 2 250 39 -- WC (Bill) Jones --

Unknown Date Standards and ISO 8601

2006-05-22 Thread Kenneth B. Hill
I apologize if this posting is not specific to Perl usage, but I'm doing some research on standards for handling unknown date values (e.g, when a complete date is not known). I work in an industry niche (cancer registry and public health data collection) that does not follow ISO 8601 for

Parsing HL7 records using Perl

2006-05-12 Thread Kenneth B. Hill
I'm exploring ways to parse an HL7 record/file to a PostgreSQL database table. Actually, I think all I need to do is parse/transform the HL7 record/file to delimited flat-file, and then I can use PostgreSQL's copy command to load the data into a table. I would appreciate any guidance here.

How to change properties of IE 6.0

2006-03-28 Thread a b
be helpful Waiting for a great healp !! Thanks a b

Re: How to extract the path of the file name in perl

2006-03-28 Thread a b
Simpler approach may be this my $path='C:\Documents and Settings\anish\Desktop\Design Documen1.doc'; my @a=split(/\\/,$path); print join \n,$a[$#a]; Thanks, a b On 3/28/06, Xavier Noria [EMAIL PROTECTED] wrote: On Mar 28, 2006, at 11:31, Anish Kumar K. wrote: How to extract the path

survive with exec

2006-02-27 Thread a b
$a=1; while($a) { $a=1; } Here i want to execute one and then execute another but don't wait for previous command i.e.something in background but im unable to do it. any idea ??? Thanks a b

Re: survive with exec

2006-02-27 Thread a b
Hello, The Os was windows and use of start along with system is working fine. Thanks Regards a b On 2/28/06, Timothy Johnson [EMAIL PROTECTED] wrote: What operating system are you running, and how important is the return code to you? If you are using Windows, for example, you can use

help required regarding Win32::OLE

2006-02-09 Thread a b
configuration/Management using Win32::OLE. Thanks and regards a b

Win32::OLE for IIS

2006-02-06 Thread a b
Hello all, I have one require to modify the properties of IIS runing on remote machine. i tried it with Win32::OLE module but unsuccessful my code :- use strict; use Win32::OLE; use Win32::OLE::Enum; Win32::OLE-Option(Warn = 3); my $hostname = 'myremotehost'; my $rootkey ; my $Collection =

Re: how to run perl file from a html page

2006-02-06 Thread a b
Hy all, I think i got the solution i am using perlscript @ client side in that webpage and i am able to got the params from user and able to execute some functions (with out any web server) Thanks for your help. a b On 2/3/06, JupiterHost.Net [EMAIL PROTECTED] wrote: a b wrote: Hy , Hello

Win32::OLE for IIS

2006-02-06 Thread a b
Hello all, I have one require to modify the properties of IIS runing on remote machine. i tried it with Win32::OLE module but unsuccessful my code :- use strict; use Win32::OLE; use Win32::OLE::Enum; Win32::OLE-Option(Warn = 3); my $hostname = 'myremotehost'; my $rootkey ; my

how to run perl file from a html page

2006-02-03 Thread a b
Hello all, i am new and want to get the params from html page and execute perl script at local machine please help me in this matter. thanks and regards, abhishek

Re: how to run perl file from a html page

2006-02-03 Thread a b
://learn.perl.org/library/beginning_perl/3145_Chap12.pdf Hope that be useful to you. -Original Message- From: a b [EMAIL PROTECTED] Sent: Feb 3, 2006 5:31 AM To: beginners@perl.org Subject: how to run perl file from a html page Hello all, i am new and want to get the params from html

how to send mail within a script ?

2005-10-22 Thread Juan B
HI, I am trying to write a script which will send the result of a var to mail web mail.this is what I wrote : #!/usr/bin/perl #use strict; use warnings; my $file_listing = `/usr/bin/nmap -p 80 192.168.1.1`; How can it be done? do I need to configure sendmail on my linux box. please try to give

helping writing a script

2005-10-16 Thread Juan B
Hi guys ! I have four html pages. within eack one I have a firewalls logs.I need to write a script that will search all the ip address after the work from: and wrote tham in a file and if the ip is written already in the report file so dont write in again. please help me on this or give me some

RSS feed to perl

2005-04-18 Thread Ron B
Please, tell me an easy way to put rss-feed to my home site. Ok, I know, there's zillions ready made php and perl scripts to do that, but is there an easy way to do it? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Changing the String of the file at one shot.

2005-03-07 Thread Suneel Kumar B
Hi Goodies, I have a situation where in, iam updating a file by replacing few strings in some lines with another string. While doing this, Can i have an option by which i could open a file for both read and write simultaneously, so that i could search and replace the string straight away..??

How can we get the Line Number

2005-03-01 Thread Suneel Kumar B
Hi all, May be my earlier mail is missed somewhere.. I wish you all a nice day.. While matching a string with each line of a file, if the string is matched with any of those lines, How can we get the line number of the line where it is matched..? Is there any built-in function for fetching the

Perl versus EXPECT(tcl)

2005-02-11 Thread A B C
Greetings, I've heard that Expect(tcl) is outstanding in what it specializes in. Can any experts in both Expect and Perl Networking comment? I want to know if Perl's Networking arena is superior or equal to what Expect specializes in. __ Do you

Scope issue

2005-01-19 Thread B McKee
Hi All I seem to have a problem with scope and/or handling objects here. If I use 'my worksheet = $workbook-add_worksheet($branchNumber) or die Couldn't add worksheet $branchNumber \n ;' then I get 'use of uninitialized variable' when I try to add to the worksheet outside the innermost if {}

Re: beginners Digest 18 Jan 2005 12:52:35 -0000 Issue 2433

2005-01-18 Thread B McKee
Apologies for the layout and busted thread - I'm on digest mode From: JupiterHost.Net [EMAIL PROTECTED] I believe this will do what you want: next if grep { $rawreport_item =~ /$_/ } @possibleMatches; Just make sure the regexes in @possibleMatches are not user supplied or they may try sneaky

replacing multiple matches with an array

2005-01-17 Thread B McKee
Hi All I have this bit of code in a program I'm working on. while (RAWREPORT) { next if /\f/ ; next if /^DATE : / ; next if /^\s{15,}PART / ; next if /^COUNTER QTY/ ; next if /^\s+$/ ; print ; #

removing line from a file

2004-12-02 Thread Chandu B S
hi experts I want to delete a line in a file depending on the content of line, if my file is like this ccc d eee ee perl hh Here i want to remove the 4th line because it contains word perl !! ( of course i like

Re: untainting data

2004-11-10 Thread B McKee
On Wednesday, November 10, 2004, at 04:02 PM, Sara wrote: If the 'name' is coming from a Form, try limiting it within the form tags, it's always a better idea. I thought (correct me if I'm wrong here - I'm no expert) that you want to do this at both ends because the bad guys can always

Problem com var on a require...

2004-11-09 Thread Jair V. B. Junior
Hi all, here comes a little confusing question :-) a.pl: #!/usr/bin/perl require 'b.def'; $test = 'World!'; print $abacus; b.def: $abacus = Hello $test; When I run it: $ perl a.pl Hello Why is this going wrong? Thanks! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

RE: failure with: system(dir /b); exec(dir /b); `dir /b`

2004-09-17 Thread A B C
Hi, I'm using ActiveState v5.8.4 on Windows XP Home03. Here is the entire script... print `dir /s`; print \n-\n; system('dir /b'); print \n-\n; exec(dir /w); print \n-\n; === Here is the result after executing... C:\~pperl test.pl dir: /s: No such file or directory

RE: failure with: system(dir /b); exec(dir /b); `dir /b`

2004-09-17 Thread A B C
Home03. Here is the entire script... print `dir /s`; print \n-\n; system('dir /b'); print \n-\n; exec(dir /w); print \n-\n; Since dir is a built-in, you should do this: use strict; print qx!cmd /c dir /s!; print \n-\n; system('cmd /c dir /b'); print \n

failure with: system(dir /b); exec(dir /b); `dir /b`

2004-09-16 Thread A B C
Greetings, Does anyone know how to get perl to run windows commands like dir /b. Specifically, perl doesn't accept any type of argument switches. I've tried system(), exec() and backticks in my script. However, If I remove the switch, for example: system(dir). This works fine. But I need those

Re: Net::SNMP session creating problem : develop this as a pakage file

2004-09-08 Thread Geetha B
(arguments) Please do guide Thanks, Geetha On Tue, 2004-09-07 at 19:50, Chris Devers wrote: On Tue, 7 Sep 2004, Geetha B wrote: ($session, $error) = Net::SNMP-session( -hostname = shift || 'localhost', -community = shift || 'public', -port = shift || 161

Net::SNMP session creating problem

2004-09-07 Thread Geetha B
Hi , I'm using NET::SNMP perl package to send do SNMP operations. This requires establishing snmp session. upon calling create session , I'm getting error ERROR: Unknown error creating socket. The code which gives the above error is given below.

Re: Assigning fix elements of array into fix variables efficiently

2004-08-23 Thread Chandu B S
did U try this: ($a,$b,$c) = @array; - Original Message - From: Edward Wijaya [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 23, 2004 12:42 PM Subject: Assigning fix elements of array into fix variables efficiently Hi, Suppose I have this array: @array

perl foreach loop

2004-07-09 Thread Selenis B Leguisamon
program. Thanks a lot ! Selenis B. Leguisamon Systems Management Integration Professional IBM Global Services Work: 908-231-4375 E-mail: [EMAIL PROTECTED]

Re: Script does not work on IE

2004-07-07 Thread B McKee
On Wednesday, July 7, 2004, at 12:49 AM, roland maynard wrote: I am not quite sure what you mean, but the generated HTML looks like a webpage with a form on Mozilla, and looks like a blank page on explorer. Check it out here: http://willamette.edu/dept/comm/wtreport/login.cgi Thanks. -

foreach problem

2004-05-21 Thread Ron B
I'm working with very simple viewer code and here's a working snippet of it. My problem is how to print the next line after the line that includes BLAH. So I want to print lines including BLAH keyword and when BLAH is found the next line after it. The next line carries additional info for the

Re: foreach problem

2004-05-21 Thread Ron B
Thanks. I modified the while loop to fit my purpose. Sami Panula (aka Ron B) Bob Showalter wrote: Ron B wrote: My problem is how to print the next line after the line that includes BLAH. So I want to print lines including BLAH keyword and when BLAH is found the next line after it. #!/usr/bin

Default FTP agent for CPAN

2004-05-06 Thread B McKee
CPAN wants to use Net::FTP but it doesn't work behind our corporate firewall. Ncftp or wget works fine, once the endless timeout wait is over. I found this on a perl list, but it's not working for me. I'm using perl 5.6 on OSX. Suggestions? With perl 5.8 having libnet as standard and the

Re: Perl vs PHP

2004-04-22 Thread Ron B
Why would one prefer Pepsi over Coke, or vice versa? :) That's the answer to your question. [EMAIL PROTECTED] wrote: Why would one prefer PHP over PERL, or vice, versa? I'm guessing PERL has more functionaltiy and is more robust. What are the technical arguments for one over the other? JP

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: form name=upload action=myperl.pl enctype=multipart/form-data method=post input type=file name= input type=submit value= ok /form myperl.pl use CGI (:standard); my $file = param(file_to_upload); my

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: form name=upload action=myperl.pl enctype=multipart/form-data method=post input type=file name= input type=submit value= ok /form myperl.pl use CGI (:standard); my $file = param(file_to_upload); my

RE: How do I make a variable globally accessible without vars

2004-04-17 Thread B. Fongo
|| To: 'B. Fongo'; [EMAIL PROTECTED] || Subject: RE: How do I make a variable globally accessible without vars || || B. Fongo [EMAIL PROTECTED] wrote: || : || : I get the usual warning Use of uninitialized . while trying || : to test a variable ($counter) which is initialized later in || : my

How do I make a variable globally accessible without vars

2004-04-16 Thread B. Fongo
I get the usual warning Use of uninitialized . while trying to test a variable ($counter) which is initialized later in my script. Using the pragma use vars ($counter) makes it sticky. To avoid, I tried to work around it by passing it to a sub. my $counter = counter(); if ($counter ==

What exactly is this simple regex doing?

2004-04-16 Thread B. Fongo
anyone's leg. So just explain it if you can. (.domain4you.com from http:://www. domain4you.com.) foreach (@domains) { my $name = $_; $name =~ s/^[^\.]+//; print $name; } -Original Message- From: B. Fongo [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 2004 7:29 PM To: [EMAIL

RE: What exactly is this simple regex doing?

2004-04-16 Thread B. Fongo
qualifier. Oh! How I wish I could understand it. :-) I think I need to go back to learn some more regexs. || -Original Message- || From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] || Sent: Friday, April 16, 2004 5:40 PM || To: B. Fongo; [EMAIL PROTECTED] || Subject: Re: What exactly

Regex to match domain for cookie

2004-04-15 Thread B. Fongo
How do I match a domain name starting from the dot? # Match something like these .domain4you.co.uk .domain-house.de This is what I have: @domains = (http://www.domain.com , http://www.domain4you.co.uk http://www.domain-house.de; https//rrp.cash-day.com ); foreach

AW: Regex to match domain for cookie

2004-04-15 Thread B. Fongo
of www.domain4you.com, www will be truncated isn't it? $name =~ s/^[^\.]+//; I hope I got the logic right. Thanks Babs -Ursprüngliche Nachricht- Von: Hanson, Rob [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 16. April 2004 01:36 An: 'B. Fongo'; [EMAIL PROTECTED] Betreff: RE: Regex

Redirect using .htaccess or ?? ( kinda [OT] )

2004-04-07 Thread B McKee
Yeah, ok, this isn't completely on topic. Please humour me (or at least flame me politely). I need to redirect people to a perl-CGI script I have written a perl script that generates a series of active web pages. It's in the cgi-bin and works fine when accessed directly eg:

Re: Parsing the hyperlink?

2004-03-30 Thread Ron B
Thanks. I think I'll use regex this time, 'cause it fits the purpose good enough. But it's really nice thing to know the module for the future versions of my script. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Calendar HTML Form

2004-03-29 Thread B McKee
Good Afternoon All I'm overhauling the website I run for a men's rec slopitch league. It's all CGI.pm and mySQL. I'm adding a section to reschedule rain-out games. I want the users to pick the new date from a 'calendar'. I think this will be a more natural interface than drop-down

Parsing the hyperlink?

2004-03-29 Thread Ron B
I'm running my own version of bulletinboard and I have a little problem with hyperlinks. I'd like to make them really work. So if posted message includes http://blaablaablaa it would be a hyeprlink when reader opens the message. Messages are stored in .html files so it's quite easy to add a

Apache::Session question

2004-03-26 Thread B. Fongo
My implementation of Apache::Session::MySQL dies along the way, and gives unclear warning. [error] Died at /usr/lib/perl5/site_perl/5.8.0/Apache/Session/Generate/MD5.pm line 40. I decided to implement session as a module call Store::Session, so as to minimize recoding it in many script. Babs

AW: Apache::Session question

2004-03-26 Thread B. Fongo
The error occurs on initial call, so id should be empty be then. I expect the routine to open a new session (see code below) if session_id is empty - but it fails then. == my $dbh = dbConnect(); # Get value of url or cookie id if any. my

Fwd: Apache::Session question

2004-03-25 Thread B. Fongo
My implementation of Apache::Session::MySQL dies along the way, and gives unclear warning. [error] Died at /usr/lib/perl5/site_perl/5.8.0/Apache/Session/Generate/MD5.pm line 40. I decided to implement session as a module call Store::Session, so as to minimize recoding it in many script. Babs

use lib

2004-03-23 Thread B. Fongo
Is it recommendable to use the pragma use lib when installing a program on a server shared by many users? Assuming my IPS did not install certain CPAN modules which my needs, and I decide to install them in my www directory. In such a scenario, putting use lib on my scripts will add my module

How to add an item into Shopping cart

2004-03-22 Thread B. Fongo
I'm working on a shopping cart, and yet to implement Apache::Session. But before then, I have a question on how to populate a shopping cart without the page reloading. Is there a way of achieving this using perl? I believe it is possible to use JavaScript event-handler can be to keep track of

Perl from Terminal in OSX

2004-03-18 Thread B McKee
From: David Gilden [EMAIL PROTECTED] Date: Thu Mar 18, 2004 12:27:57 PM Canada/Eastern To: [EMAIL PROTECTED] Subject: running PERL from CMD line OSX Trying to run a perl script in OSX shell, and It is not working, what am I missing? here is what I am typing: perl -e test.pl #!/usr/bin/perl

AW: returning hashes, and arrays

2004-03-17 Thread B. Fongo
That should work provided you're returning only on list. It is much better to use reference when passing or retrieving more than one value. For instance: Retrieve the values from a sub as refereces. ($xRef, $yRef, $zRef) = example(); # my @x = @$x; my @y = @$y; my $z = $$z; sub example {

AW: Problem using require()

2004-03-15 Thread B. Fongo
. What I don't understand - is why my scripts get only the first variable in the config file, but fail on the rest. Babs -Ursprüngliche Nachricht- Von: Randy W. Sims [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 14. März 2004 19:07 An: B. Fongo Cc: [EMAIL PROTECTED] Betreff: Re: Problem

AW: AW: Problem using require()

2004-03-15 Thread B. Fongo
I've checked cpan AppConfig. I may get back to it. Thanks Randy -Ursprüngliche Nachricht- Von: Randy W. Sims [mailto:[EMAIL PROTECTED] Gesendet: Montag, 15. März 2004 12:36 An: B. Fongo Cc: [EMAIL PROTECTED] Betreff: Re: AW: Problem using require() On 03/15/04 06:19, B. Fongo wrote

Problem using require()

2004-03-14 Thread B. Fongo
I have several modules which needs global variables from a text file (global.txt). Within each module, I use require global.txt to get my variables. global.txt $shop =

Which method is best for passing session id?

2004-03-10 Thread B. Fongo
I'm trying to implement cgi sessions with Apache::Session and found myself contemplating on a method to pass session id to my script. I'll appreciate if someone experienced could help me out of that - by giving any pros and cons on the following methods: 1. URL 2. Hidden fields 3.

Any CPAN module for creating thumbnails?

2004-03-07 Thread B. Fongo
I wander if here a way to create thumbnails using Perl? I want to implement functionality for my shop program to create a thumbnail of product pictures. A good instance of it may be that of eBay. Users can upload a picture of any dimension for their listing. EBay will automatically create a

AW: Any CPAN module for creating thumbnails?

2004-03-07 Thread B. Fongo
Thanks for the link. I'll try Image::Magic::Thumbnail. -Ursprüngliche Nachricht- Von: WC -Sx- Jones [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 7. März 2004 16:08 An: B. Fongo Cc: [EMAIL PROTECTED] Betreff: Re: Any CPAN module for creating thumbnails? B. Fongo wrote: I wander if here

AW: Any CPAN module for creating thumbnails?

2004-03-07 Thread B. Fongo
: WC -Sx- Jones [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 7. März 2004 16:08 An: B. Fongo Cc: [EMAIL PROTECTED] Betreff: Re: Any CPAN module for creating thumbnails? B. Fongo wrote: I wander if here a way to create thumbnails using Perl? I want to implement functionality for my shop program

subroutine placement (Layout conventions)

2004-02-26 Thread B McKee
Hi All, I'm slowly creating my Perl Masterpiece (tm) I'll let ya all giggle over it when I'm done :-) At any rate - It's done what I believe you call top-down. I declare the subs, then have the code for the main program, then the subroutine code blocks. My question is what order should

AW: AW: Need help to divert HTML print ETHL to file.txt

2004-02-19 Thread B. Fongo
to you all guys Babs -Ursprüngliche Nachricht- Von: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 18. Februar 2004 15:41 An: B. Fongo; [EMAIL PROTECTED] Betreff: Re: AW: Need help to divert HTML print ETHL to file.txt Hello, Can you guys tell me on this piece

<    1   2   3   4   >