Re: slash question

2003-06-27 Thread Nicholas Davey
You could escape them. That usualy works for me. Example: $dir= \/\/ITC\/home\/techs; Yes I know how sloppy that looks, but if it works and doesnt matter, why worry bout it? -- www.vadtec.net [EMAIL PROTECTED] Susan Aurand [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If I

Re: saving a textarea to a text file

2003-06-27 Thread Jon Hogue
check out HTML::Normalizer at http://www.oclc.org/research/software/webutils/index.shtm At 10:14 PM 6/26/2003 -0400, Bob X wrote: How would I go about saving the textarea of an HTML page to a text file? Bob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: Why should I create an object? (long)

2003-06-27 Thread Charles K. Clarkson
Greenhalgh David [EMAIL PROTECTED] wrote: : : Bare in mind that I am still a beginner at coding. Why : is it good practice to create an object when using : CGI, rather than just diving in? : : For example: : : use CGI ':standard'; : my $q=new CGI; : my $input=$q-param('input'); : : and : :

Re: slash question

2003-06-27 Thread Jon Hogue
At 01:11 AM 6/27/2003 -0500, Nicholas Davey wrote: You could escape them. That usualy works for me. Example: $dir= \/\/ITC\/home\/techs; Yes I know how sloppy that looks, but if it works and doesnt matter, why worry bout it? you should quote things like they will be printed. it increases

Why not Class Objects

2003-06-27 Thread Daniel J. Rychlik
I have been a perl developer or about a year and half and I have a question. How come perl does not support the use of Class Objects ? Thanks in Advance , Dan

Re: Why not Class Objects

2003-06-27 Thread Daniel J. Rychlik
Thank you sir for the response, I will have a look. I love programming in perl, but Im getting used to the idea of developing class objects and instances in PHP. class thisclass { } class otherclass extends thisclass { } Object oriented programming is a great way to reuse code. I appreciate

Re: http_referer question

2003-06-27 Thread anthony
Hi. I have an idea, if someone creates an external program to overload my database, How do i prevent that, if all the fields are correct? Anthony -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Why should I create an object?

2003-06-27 Thread Octavian Rasnita
You should create an object because you might import more modules in your application that export the param() function/method. In that case the program won't know which of those param() functions to use. I guess this is just one reason, but I am sure there are more. Teddy, Teddy's Center:

Re: http_referer question

2003-06-27 Thread Jon Hogue
what do you mean by overload? you should never trust data coming in from a webform. for example, if you are collecting a phone number and the data is in $phoneNumber.. do something like, $phoneNumber =~ s/.*(\d{3}-\d{3}-\d{4}).*/ or handleError() if ( $phoneNumber !~ /^(\d{3}-\d{3}-\d{4})$/ );

Re: Why not Class Objects

2003-06-27 Thread Ovid
--- Daniel J. Rychlik [EMAIL PROTECTED] wrote: I have been a perl developer or about a year and half and I have a question. How come perl does not support the use of Class Objects ? Hi Dan, Much of Perl's OO support is currently clumsy. Perl has taken the simplest thing that can

Packages, run modes, and scopes, oh my

2003-06-27 Thread Scot Robnett
I was wondering if anyone can point me to newbie-type tutorials on any of the following (including but not limited to which perldocs I can read): - Definition of 'lexical' and 'canonical' - Differences between 'my' and 'local' - Good overview of packages and namespaces

RE: Packages, run modes, and scopes, oh my

2003-06-27 Thread Charles K. Clarkson
Have you seen the tutorials at perlmonks? http://www.perlmonks.com/index.pl?node=Tutorials HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

help me perl : sftp

2003-06-27 Thread vemulakonda uday bhaskar
dear all i have a code to tranfer file between two linux machines using sftp for that i used use Net::SFTP, but it is giving error saying Can't locate Net.SFTP.pm [EMAIL PROTECTED] (@INC contains /usr/lib/perl5/5.6.0/1386-Linux..) at shh3.pl linux.. how should i go and fix the problem

Re: help me perl : sftp

2003-06-27 Thread Casey West
It was Friday, June 27, 2003 when vemulakonda uday bhaskar took the soap box, saying: : dear all : : i have a code to tranfer file between two linux machines using : sftp : : for that i used use Net::SFTP, but it is giving error saying : Can't locate Net.SFTP.pm [EMAIL PROTECTED] : (@INC

How can i make this faster?

2003-06-27 Thread magelord
hi, i wrote this little program. it reads a file and puts the output into a treelike structure. the content of the file is the output of the du command. something like that: 124k /var/backups/dpkg.status.3.gz 12k /var/log/auth.log.1.gz 12k /var/log/daemon.log.1.gz 12k /var/log/debug.1.gz 12k

HELP! Reg-ex question

2003-06-27 Thread Mike
Given the following code snippet: - print $text\n; my $text=sour red apples; my $pattern=(sour); my $replacement=very \$1; $text=~s/$pattern/$replacement/; print $text\n; - I was expecting very sour red apples to be printed, but

Re: using whence

2003-06-27 Thread Brandon Willis
`$cmd` or it identical twin qx($cmd) both shell out and actually do an sh -c. So if you are looking for something specifically in ksh you'll have to run ksh from within the qx(). |b On Thu, 2003-06-26 at 16:21, David Parker wrote: Hi. I have a perl script that calls various programs. I would

Count Function?

2003-06-27 Thread Nelson Ray
Does anyone know of any sort of a function or method in perl that returns the number of times a search string exists in a scalar. Say, how many a's are there in this sentence? I am able to write it myself, but I was wondering if Perl had an inherent function for cleaner operation. I tried

Re: Hmm....is a hot directory possible?

2003-06-27 Thread Gary Stainburn
On Thursday 26 Jun 2003 10:38 pm, Jenda Krynicky wrote: From: Chris Zimmerman [EMAIL PROTECTED] Is there some way that I can write a bit of code that will watch a directory and as soon as a file is written to that directory, something is run against that file? What would be the best way

RE: HELP! Reg-ex question

2003-06-27 Thread Tim Johnson
I can't test this out here, but I think the e after the regex makes the right side get evaluated as code, so maybe you need to put quotes around the right-hand side of your regex: $text=~s/$pattern/$replacement/e; -Original Message- From: Mike To: [EMAIL PROTECTED] Sent: 6/26/03

Problem with cgi

2003-06-27 Thread beginner beginner
Hi All, Seems to be OT but still thought you guys can help me I have an html page If I click submit I calls cgi script and executes that but in my Case Windows XP It is just opening that script. and not executig that. Could you please suggest how to solve this problem Thanks, Amit

Re: Count Function?

2003-06-27 Thread Sudarshan Raghavan
Nelson Ray wrote: Does anyone know of any sort of a function or method in perl that returns the number of times a search string exists in a scalar. Say, how many a's are there in this sentence? I am able to write it myself, but I was wondering if Perl had an inherent function for cleaner

Re: Count Function?

2003-06-27 Thread Janek Schleicher
Nelson Ray wrote at Thu, 26 Jun 2003 19:25:37 -0700: Does anyone know of any sort of a function or method in perl that returns the number of times a search string exists in a scalar. Say, how many a's are there in this sentence? I am able to write it myself, but I was wondering if Perl had

Converting/executing a PERL script in binaries

2003-06-27 Thread Leaw, Chern Jian
HI, I'm wanting to execute my PERL script in a binary/executable form. I wrote a C wrapper to do so. However, when executing the binary code produced by the wrapper, it produced the warning message as attached the file WRAPPER-OUTPUT.txt. However, when executing just the script itself, the

Re: HELP! Reg-ex question

2003-06-27 Thread Sudarshan Raghavan
Mike wrote: Given the following code snippet: - print $text\n; my $text=sour red apples; my $pattern=(sour); my $replacement=very \$1; $text=~s/$pattern/$replacement/; print $text\n; - I was expecting very sour red apples to be

RE: linefeed

2003-06-27 Thread Charles Scheepers
The problem is that these characters are added when printing the output to file. Even if I remove these with chomp or chop they will be added again when I write the data to file. Regards, Charles Scheepers Pr.Eng. [EMAIL PROTECTED] (011) 324-9026 (084) 511-6164 -Original

Help : Net::FTP

2003-06-27 Thread vemulakonda uday bhaskar
Dear all Can u give me a site from where i can download and install Net::FTP Regards uday bhaskar.v.v. ___ Click below to experience Sooraj Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan, Abhishek Bachchan Kareena

Help : Net::FTP

2003-06-27 Thread vemulakonda uday bhaskar
Dear all Can u give me a site from where i can download and install Net::FTP Regards uday bhaskar.v.v. ___ Click below to experience Sooraj Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan, Abhishek Bachchan Kareena

Re: Help : Net::FTP

2003-06-27 Thread Sudarshan Raghavan
vemulakonda uday bhaskar wrote: Dear all Can u give me a site from where i can download and install Net::FTP For all you perl module download needs, go here http://search.cpan.org Please bookmark it. Regards uday bhaskar.v.v. ___ Click

it seems impossible to me...

2003-06-27 Thread Adriano Allora
Hi to all, I have to clean a huge array in wich every element is a text line. My cleaning consists in deleting each item if it appears more than one time. I cannot use hashes and I'd prefer avoiding foreach cycles (I have a lot of arrays, and so...). I searched a function wich works in this

help perl+ftp

2003-06-27 Thread vemulakonda uday bhaskar
Dear all From where i can download Net::FTP module to install it in my system With Regards V.V. Uday Bhaskar ___ Click below to experience Sooraj Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan, Abhishek Bachchan

Re: it seems impossible to me...

2003-06-27 Thread Gabor Urban
If you use Unix type of system, there a full shell solution: - print your array to a text file - sort the file with the unix command 'sort' - remove the multiple lines with the unix command 'uniq' You may find the details in the man Gabaux Linux is like a wigwam: no gates, no windows, and an

RE: IPC with parent from mutiple children

2003-06-27 Thread Lodewijks, Jeroen
I think I have found the problem. It turns out that the closing and opening of the pipe is in the wrong place. This code actually works: #!/bin/env perl # use strict; use FileHandle; # Global variables; my $child = 0; my $max_child = 60; # --- Sub routines

Help Net::FTP download

2003-06-27 Thread vemulakonda uday bhaskar
Hi All i searched for Net::FTP in http://search.cpan.org, but i could not find anyplace from where i can download it.i can got o that page where there is explanation about Net::FTP, but no where could i find the dowmload site could u help me in this regards With Regards V.V. uday Bhaskar

Help Net::FTP download

2003-06-27 Thread vemulakonda uday bhaskar
Hi All i searched for Net::FTP in http://search.cpan.org, but i could not find anyplace from where i can download it.i can got o that page where there is explanation about Net::FTP, but no where could i find the dowmload site could u help me in this regards With Regards V.V. uday Bhaskar

perl help ftp

2003-06-27 Thread vemulakonda uday bhaskar
hi all can anyone tell me from where i can download Net::FTP from www.cpan.org with regards uday bhaskar ___ Click below to experience Sooraj Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan, Abhishek Bachchan Kareena

perl help ftp

2003-06-27 Thread vemulakonda uday bhaskar
hi all can anyone tell me from where i can download Net::FTP from www.cpan.org with regards uday bhaskar ___ Click below to experience Sooraj Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan, Abhishek Bachchan Kareena

RE: using whence

2003-06-27 Thread David Parker
As it happens, on my platform (z/OS UNIX), the sh actually IS a form of korn shell (it was ported to the mainframe by MKS, apparently), so there is a 'whence'. What's weird is that doing something like $path = `whence $cmd | uniq` actually works, though the pipe to uniq is pointless.

RE: perl help ftp

2003-06-27 Thread Darbesio Eugenio
-Original Message- vemulakonda uday bhaskar wrote: ... can anyone tell me from where i can download Net::FTP from www.cpan.org ... Browse to http://search.cpan.org/ then search for Net::FTP. E. CONFIDENTIALITY

help perl ftp

2003-06-27 Thread vemulakonda uday bhaskar
Hi AALL thoughi searched http://search.cpan.org/, i couldnot get the p[lace from where i can download NEt::FTP. I on;y got is a theorotical explanation of Net::FTP please help me in this regads with regards uday bhaskar ___ Click below to

Socket question

2003-06-27 Thread Gabor Urban
Hi, I am still working on a socket problem at low level, and there is something I wander. Are Perl socket bidirectional? I am currently work to test an Apache module, that processes HTTP POST requests. I thought at the beginning, that a Perl script would do perfect for me. Code fragment:

Re: Count Function?

2003-06-27 Thread Kevin Pfeiffer
In article [EMAIL PROTECTED], Sudarshan Raghavan wrote: Nelson Ray wrote: Does anyone know of any sort of a function or method in perl that returns the number of times a search string exists in a scalar. Say, how many a's are there in this sentence? I am able to write it myself, but I was

RE: help perl ftp

2003-06-27 Thread Darbesio Eugenio
-Original Message- ... thoughi searched http://search.cpan.org/, i couldnot get the p[lace from where i can download NEt::FTP. I on;y got is a theorotical explanation of Net::FTP ... Try http://search.cpan.org/, then search for Net::FTP, choice the second one in the list, click (LMB)

Re: Count Function?

2003-06-27 Thread Paul Johnson
Kevin Pfeiffer said: Thanks to Sudarshan Janek! I found this as suggested... # NOTE: (from perlop) # Because the transliteration table is built at com­ # pile time, neither the SEARCHLIST nor the REPLACE­ # MENTLIST are subjected to double quote interpola­ # tion. That means that if

checking OS support for flock

2003-06-27 Thread Motherofperls
I'm learning on a win98 machine and my webserver is a unix OS. win98 doesn't support flock and of course unix does. How can I code to test if the function is supported? I tried conditionals but it still throws the error.

Simple question on splice

2003-06-27 Thread Sitha Nhok
Hi, if I have a multidimensional array like : @AoA = ( [ABC, BCD], [CDE, DEF], [EFG, FGH], ); then do: @var = splice @AoA, 2, 1; # to delete the last row print @var; #print what was returned from splice The print

Re: Count Function?

2003-06-27 Thread Kevin Pfeiffer
Hi Paul, In article [EMAIL PROTECTED], Paul Johnson wrote: Kevin Pfeiffer said: [...] But what I can't figure out (and have tried several variants) is how to get the count when using a variable (ala' from inside an eval). This is the closet I got: my $sentence = Here is my test

RE: help perl ftp

2003-06-27 Thread Aman Thind
when you see the outcome of your search for Net::FTP on search.cpan.org you see something like : Net::FTP FTP Client Class perl-5.8.0 - Date - author Net::FTP FTP Client Class libnet-1.16 - Date - author DON'T click on Net::FTP, that is where you're finding the **theorotical explanation**

Re: perl help ftp

2003-06-27 Thread Kevin Pfeiffer
Hi, In article [EMAIL PROTECTED], Vemulakonda Uday Bhaskar wrote: hi all can anyone tell me from where i can download Net::FTP from www.cpan.org with regards uday bhaskar (Your messages are being sent twice for some reason) After you've found the module, near the top of the page is a

Re: using whence

2003-06-27 Thread Jeff Westman
David Parker wrote: Hi. I have a perl script that calls various programs. I would like to be able to verify that a given program is being called from the right place - what I would use whence for in the korn shell. I tried $path = `whence $cmdname`; but I don't get anything

RE: using whence

2003-06-27 Thread David Parker
Excellent. That explains why the pipe made it work. Thanks! - DAP -Original Message- From: Jeff Westman [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2003 11:04 AM To: beginners Subject: Re: using whence David Parker wrote: Hi. I have a perl script that calls various

Re: Simple question on splice

2003-06-27 Thread Rob Anderson
Sitha Nhok [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, if I have a multidimensional array like : @AoA = ( [ABC, BCD], [CDE, DEF], [EFG, FGH], ); then do: @var = splice @AoA, 2, 1; # to delete the

Re: Simple question on splice

2003-06-27 Thread Rob Anderson
Rob Anderson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Sitha Nhok [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, if I have a multidimensional array like : @AoA = ( [ABC, BCD], [CDE, DEF], [EFG, FGH],

Linux, Perl, [open,star]office

2003-06-27 Thread Paul Kraus
I have a windows app that reads a bunch of text files and then using Win32::OLE it inserts that data into an excel spreadsheet. Is there something similar I can do with an open office document in Linux? I am trying to switch my workstation over to all Linux but need to be able to generate the

RE: Socket question

2003-06-27 Thread LoBue, Mark
-Original Message- From: Gabor Urban [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2003 6:13 AM To: [EMAIL PROTECTED] Subject: Socket question Hi, I am still working on a socket problem at low level, and there is something I wander. Are Perl socket bidirectional? I am

Re: Simple question on splice

2003-06-27 Thread Rob Dixon
Sitha Nhok wrote: Hi, if I have a multidimensional array like : @AoA = ( [ABC, BCD], [CDE, DEF], [EFG, FGH], ); then do: @var = splice @AoA, 2, 1; # to delete the last row print @var; #print what was returned from

Re: Simple question on splice

2003-06-27 Thread Rob Dixon
Sitha Nhok wrote: Hi, if I have a multidimensional array like : @AoA = ( [ABC, BCD], [CDE, DEF], [EFG, FGH], ); then do: @var = splice @AoA, 2, 1; # to delete the last row print @var; #print what was returned from

Always on Top.. TK

2003-06-27 Thread Voodoo Raja
Hi all.. Just a quick one.. Is it possible to force my TK application to on top of all the windows that are present on the screen.. or rather set the window to be always visible ... best regards Sam _ STOP MORE SPAM with the new

Re: Linux, Perl, [open,star]office

2003-06-27 Thread Thomas A. Lowery
I've found these modules work well for creating excel spreadsheets. Spreadsheet::ParseExcel Spreadsheet::WriteExcel I recently wrote a script that converts csv files into worksheets in a workbook. Makes it easier for a client to review their different reports. Tom On Fri, Jun

Re: Hmm....is a hot directory possible?

2003-06-27 Thread Wiggins d'Anconia
Gary Stainburn wrote: On Thursday 26 Jun 2003 10:38 pm, Jenda Krynicky wrote: From: Chris Zimmerman [EMAIL PROTECTED] Is there some way that I can write a bit of code that will watch a directory and as soon as a file is written to that directory, something is run against that file? What would

Re: checking OS support for flock

2003-06-27 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: I'm learning on a win98 machine and my webserver is a unix OS. win98 doesn't support flock and of course unix does. How can I code to test if the function is supported? I tried conditionals but it still throws the error. What conditionals did you try? Some common

Why Global symbol require explicit package name

2003-06-27 Thread Babale Fongo
Hello guy! I would like to know why I need to declare global variables with my. My script looks something like thing: Use strict; $strg = A string; $strg2 = a second string; I get a warning: Global symbol require explicit package name. unless I declare the variables like: my $strg = A string;

Re: Why Global symbol require explicit package name

2003-06-27 Thread George Schlossnagle
perldoc strict look at 'use strict vars' in particular. George On Friday, June 27, 2003, at 08:51 PM, Babale Fongo wrote: Hello guy! I would like to know why I need to declare global variables with my. My script looks something like thing: Use strict; $strg = A string; $strg2 = a second

Re: Hmm....is a hot directory possible?

2003-06-27 Thread david
Harry Putnam wrote: david [EMAIL PROTECTED] writes: you could take a look at the stat function provided by Perl to see if the directory's last modified time or inode change time changed: This is not what the OP asked. But I wondered if one can determine if a file has been writen to or

Re: Why Global symbol require explicit package name

2003-06-27 Thread John W. Krahn
Babale Fongo wrote: Hello guy! Hello, I would like to know why I need to declare global variables with my. So that they won't be global. Using global variables is not bad per se, however most professional programmers try to avoid using them. My script looks something like thing: Use

Re: Hmm....is a hot directory possible?

2003-06-27 Thread Harry Putnam
david [EMAIL PROTECTED] writes: This is not what the OP asked. But I wondered if one can determine if a file has been writen to or changed inside a directory by looking at a stat on the directory. if i am not dreaming, OP asks for whether there is new files adding to the Maybe why I said

Re: Always on Top.. TK

2003-06-27 Thread R. Joseph Newton
Voodoo Raja wrote: Hi all.. Just a quick one.. Is it possible to force my TK application to on top of all the windows that are present on the screen.. or rather set the window to be always visible ... Possibly with bad [ie Win 9x] operating systems. On better operating systems there are