Re: First program not working

2003-03-24 Thread Francesco del Vecchio
I'm not an expert in Perl, and I matched the same kind of problems few days ago. Here you have some suggestion: 1 - Try to run it as simple perl program in the shell (# perl hello.pl) and check for errors or strange output. 2 - Go in the log directory of Apache (etc/httpd/logs) and check the er

Re: First program not working

2003-03-24 Thread R. Joseph Newton
Barb Konings wrote: > I have checked my books, checked permissions, and am > still having trouble. > > Here is my code in a file named hello.pl. I have a > link to this file off my web page to test it. > (Maybe this part is now right?...) > - - - - - - - - - - - - - - - - - - - - - - > #!/usr/bin/

Re: Iteration Question

2003-03-24 Thread R. Joseph Newton
"Rosenstein, Leon" wrote: > Hi again everyone, > > Again newbie here so go easy > > In a script I have a section that looks like this > > #Finally we have to load all extensible counters > system("lodctr faxperf.ini") or die "sorry couldn't do $!"; > system("lodctr dnsperf.ini") or die "sorry coul

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Pradeep Goel
- Original Message - From: "Jenda Krynicky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 25, 2003 12:35 AM Subject: Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI > From: "Pradeep Goel" <[EMAIL PROTECTED]> > > From: "Janek Schleicher" <[EMAIL PROTECTED]> > > >

Re: The Loop in this script is driving me crazy.

2003-03-24 Thread R. Joseph Newton
mel awaisi wrote: > Hi, > > The problem has been highlighted to me by a great person in this list, but i > just cant solve it. > > I have this script that is not working as it should be. this is what it is > supposed to be doing, take images from a directory (images are coming from > camera) and r

First program not working

2003-03-24 Thread Barb Konings
I have checked my books, checked permissions, and am still having trouble. Here is my code in a file named hello.pl. I have a link to this file off my web page to test it. (Maybe this part is now right?...) - - - - - - - - - - - - - - - - - - - - - - #!/usr/bin/perl # hello.pl print "Conten

Re: Socket Problem

2003-03-24 Thread Stefan Johnson
On Mon, 24 Mar 2003 21:24:32 -0500, Mark G <[EMAIL PROTECTED]> wrote: Hello Stefan, Ok, I replied to the previous response to my post and it apparently didn't go through, but it's irrelevant anyway. (My response to the "why bother" was summed up with "so I can learn how it's done.") good poin

Re: Socket Problem

2003-03-24 Thread Mark G
Hello Stefan, > Ok, I replied to the previous response to my post and it apparently didn't > go through, but it's irrelevant anyway. (My response to the "why bother" > was summed up with "so I can learn how it's done.") > good point, although why not build the socket your self [ you can even pac

Re: A Solution to: Using Devel::ptkdb module

2003-03-24 Thread Jeff Westman
It may have something to with your OS then, because under Linux (suse 8.1) using tcsh, I got it to work fine with setenv PTKDB_CODE_FONT 9x12 --- deb <[EMAIL PROTECTED]> wrote: > I have found a solution. If I give PTKDB_CODE_FONT env variable a full > font name, instead of just "9x12", it happ

Preventing null string from matching

2003-03-24 Thread scott . e . robinson
Dear Perl communinty, I don't exactly want to ask this now, since I just spent much of the evening trying to handle this case, but I wonder if there's an easy way to keep the following regular expression from matching if the string in the regex is null: $_ = ":B000:L520:M260:M:88:8:M602:"; $str

Re: counting fork process, again

2003-03-24 Thread Mark G
Hi Chad, I think your error lay in the place where Jenda pointed for you. Going posix way is the right way if you intend to do a lot of low level stuff your self. Mark - Original Message - From: "chad kellerman" <[EMAIL PROTECTED]> To: "beginners" <[EMAIL PROTECTED]> Sent: Monday, March 2

Re: Printing epoch time

2003-03-24 Thread John W. Krahn
Subject: Re: Printing epoch time What does this have to do with "Printing epoch time"? [EMAIL PROTECTED] wrote: > > can anyone show me how I would get the screen resolution with perl in a unix > environment? This works on my system (Linux). $ perl -le'

Re: Iteration Question

2003-03-24 Thread John W. Krahn
Leon Rosenstein wrote: > > Hi again everyone, Hello, > In a script I have a section that looks like this > > #Finally we have to load all extensible counters > system("lodctr faxperf.ini") or die "sorry couldn't do $!"; > system("lodctr dnsperf.ini") or die "sorry couldn't do $!"; > system("lod

Re: Printing epoch time

2003-03-24 Thread Jimstone77
can anyone show me how I would get the screen resolution with perl in a unix environment?

Re: to clean and copy

2003-03-24 Thread John W. Krahn
Adriano Allora wrote: > > Hi to all, Hello, > my input = a directory in which I stored a certain amount of text files > downloaded by some newsgroups; > my desired_process = to clean all the files and copy them all in > another directory; > my desired_output = another directory in which there ar

Re: counting fork process, again

2003-03-24 Thread david
Chad Kellerman wrote: > > I know this is very confusing. And I might not even be posting to the > right > list. But I am so frustrated with trying to get this thing to work. It > seems as if I have searched everywhere for examples of limiting the number > of forked processes, then being ab

Re: rename in windows doesn't work

2003-03-24 Thread Jenda Krynicky
From: "Rob Dixon" <[EMAIL PROTECTED]> > Jenda Krynicky wrote: > > From: "Rob Dixon" <[EMAIL PROTECTED]> > > > > > > Don't put \n on the end of a die string, otherwise the Perl > > > interpreter won't tell you the line number of the failure. > > > > Well it's good to know you'll get the line number

A Solution to: Using Devel::ptkdb module

2003-03-24 Thread deb
I have found a solution. If I give PTKDB_CODE_FONT env variable a full font name, instead of just "9x12", it happily agrees to do my bidding. Don't know why it works this way, but it does. I'd have to dive into the code to find out, I'm sure. So, here's what I did, setenv PTKDB_CODE_FONT "-mis

Iteration Question

2003-03-24 Thread Rosenstein, Leon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi again everyone, Again newbie here so go easy In a script I have a section that looks like this #Finally we have to load all extensible counters system("lodctr faxperf.ini") or die "sorry couldn't do $!"; system("lodctr dnsperf.ini") or die "sor

RE: Best way to stop array interpolation.

2003-03-24 Thread Bob Showalter
Bakken, Luke wrote: > > > Here are two solutions I found: > > > > > > $rec->{"loans:a_$fld" . "[$i]"} = $tmp{$fld} || ''; > > > $rec->{"loans:a_$fld\[$i]"} = $tmp{$fld} || ''; > > > > > > Are there any other ways? Just curious. > > > > "loans:a_${fld}[$i]" also works. I like your second version

RE: Best way to stop array interpolation.

2003-03-24 Thread Bakken, Luke
> > Here are two solutions I found: > > > > $rec->{"loans:a_$fld" . "[$i]"} = $tmp{$fld} || ''; > > $rec->{"loans:a_$fld\[$i]"} = $tmp{$fld} || ''; > > > > Are there any other ways? Just curious. > > "loans:a_${fld}[$i]" also works. I like your second version > above best. > > $ perl -MO=Depar

Re: rename in windows doesn't work

2003-03-24 Thread Rob Dixon
Jenda Krynicky wrote: > From: "Rob Dixon" <[EMAIL PROTECTED]> > > > > Don't put \n on the end of a die string, otherwise the Perl > > interpreter won't tell you the line number of the failure. > > Well it's good to know you'll get the line number and source file > name if you omit the newline, but

Re: Using Devel::ptkdb module

2003-03-24 Thread deb
Jeff Westman <[EMAIL PROTECTED]> had this to say, > Have you tried exporting PTKDB_CODE_FONT ? Not really - I should have said that I use tcsh, and environmental variables take effect immediately... Thanks for the response, though. deb -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Best way to stop array interpolation.

2003-03-24 Thread Bakken, Luke
Here's a quickie: I need to create a hash index out of a string that looks like this: loans:a_foo[0] If I build the index like this: $rec->{"loans:a_$fld[$i]"} = $tmp{$fld} || ''; perl thinks that $fld[$i] is an array element, which it isn't. Here are two solutions I found: $rec->{"loans:a_$

RE: Best way to stop array interpolation.

2003-03-24 Thread Bob Showalter
Bakken, Luke wrote: > Here's a quickie: > > I need to create a hash index out of a string that looks like this: > > loans:a_foo[0] > > If I build the index like this: > > $rec->{"loans:a_$fld[$i]"} = $tmp{$fld} || ''; > > perl thinks that $fld[$i] is an array element, which it isn't. > > Here

RE: The Loop in this script is driving me crazy.

2003-03-24 Thread wiggins
On Mon, 24 Mar 2003 18:52:24 +, "mel awaisi" <[EMAIL PROTECTED]> wrote: > Hi, > > The problem has been highlighted to me by a great person in this list, but i > just cant solve it. > > I have this script that is not working as it should be.

RE: help with whois code

2003-03-24 Thread Tony Esposito
Thanksgot this figured out... :-) -Original Message- From: R. Joseph Newton [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 11:21 PM To: Tony Esposito Cc: 'Brett W. McCoy'; Thomas Browner; [EMAIL PROTECTED] Subject: Re: help with whois code Tony Esposito wrote: > BTW - Anyone

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread R. Joseph Newton
Pradeep Goel wrote: > 2) > Also if somebody what I can do to make a page html instead of txt or doc - keeping > up the format ( need not be exact format but it should not just be a messed up one). > when i rename from .doc to .html or use copy command ( i.e. on windows machine) the > format goes

Re: counting fork process, again

2003-03-24 Thread Jenda Krynicky
From: chad kellerman <[EMAIL PROTECTED]> > Jenda, > Actually, that's what I started with. But here is what I found. If > I set > the $max_processes to 8 in Parallel::ForkManager. IT would indeed > spawn off 8 "children". But as the children finished "died" new ones > did not take their pla

Re: counting fork process, again

2003-03-24 Thread Jenda Krynicky
From: chad kellerman <[EMAIL PROTECTED]> > Helloe everyone, >I was wondering is someone can help me out with an issue with >forking. I > am trying to fork 8 process at a time. > >Here is what I have: > > > > #!/usr/bin/perl > use strict; > use warnings; > use lib "."; > use BACKUP

Re: Net::Telnet -- Checking File Exists -SOLUTION

2003-03-24 Thread Jeff Westman
Perseverance pays off. Solution to checking if a file exists is to store result in a variable before it gets converted: $result = sprintf("%s", $t->cmd("test -f $testFile && print 1 || print 0")); Note: None of the following worked: $result = ! $t->cmd( "test -f $testFile ; echo $?" ); $result

RE: The Loop in this script is driving me crazy.

2003-03-24 Thread Wagner, David --- Senior Programmer Analyst --- WGO
mel awaisi wrote: > Hi, > > The problem has been highlighted to me by a great person in this > list, but i just cant solve it. > > I have this script that is not working as it should be. this is what > it is supposed to be doing, take images from a directory (images are > coming from camera) and

RE: -w and warnings.pm

2003-03-24 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]> > Ok, let me simplify the question. > > Does the #!perl -w switch still work on Perl 5.6.0 and later? Yes. No need to worry. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get dr

Re: rename in windows doesn't work

2003-03-24 Thread Jenda Krynicky
From: "Rob Dixon" <[EMAIL PROTECTED]> > "Leon Rosenstein" <[EMAIL PROTECTED]> wrote: > > > > I am having some problems with a script. > > > > Currently the script reads: > > > > opendir (DIR, "c:/temp") or die "Cant Open Temp Buddy Boy! \n"; > > Don't put \n on the end of a die string, otherwise t

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Jenda Krynicky
From: "Pradeep Goel" <[EMAIL PROTECTED]> > From: "Janek Schleicher" <[EMAIL PROTECTED]> > > Pradeep Goel wrote at Mon, 24 Mar 2003 11:24:15 +0530: > > > > > Hi All ,pls answer if u know anything out of 3 different > > > questions. > > > > If you have 3 different questions, > > ask in 3 different ar

Re: counting fork process, again

2003-03-24 Thread chad kellerman
Jenda, Actually, that's what I started with. But here is what I found. If I set the $max_processes to 8 in Parallel::ForkManager. IT would indeed spawn off 8 "children". But as the children finished "died" new ones did not take their place. Not until all 8 children were finished, did a ne

Re: \ vs / vs %

2003-03-24 Thread Jenda Krynicky
From: "Rosenstein, Leon" <[EMAIL PROTECTED]> > The code: > #Ok we have renamed the files now we need to run the expand command: > system("expand perfc009.DA_ %windir%\\system32\\perfc009.DAT") && die > "no $!"; > > and when I run I get it: > > C:\Perf>perl -w maintest.pl.txt > Microsoft (R) Fil

Re: counting fork process, again

2003-03-24 Thread Jenda Krynicky
From: chad kellerman <[EMAIL PROTECTED]> > Helloe everyone, >I was wondering is someone can help me out with an issue with >forking. I > am trying to fork 8 process at a time. I did not read the previous thread. Did you consider Parallel::ForkManager or Win32::ProcFarm?

RE: \ vs / vs %

2003-03-24 Thread Timothy Johnson
Try using the %ENV hash. system("expand perfc009.DA_ $ENV{WINDIR}\\system32\\perfc009.DAT") && die "no $!"; -Original Message- From: Rosenstein, Leon [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 10:58 AM To: '[EMAIL PROTECTED]' Subject: \ vs / vs % -BEGIN PGP SIGNED ME

RE: -w and warnings.pm

2003-03-24 Thread Dan Muey
> From: "Dan Muey" <[EMAIL PROTECTED]> > > Ok, let me simplify the question. > > > > Does the #!perl -w switch still work on Perl 5.6.0 and later? > > Yes. No need to worry. Thanks for the peace of mind! > > Jenda > = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = > When it comes to

to clean and copy

2003-03-24 Thread Adriano Allora
Hi to all, my input = a directory in which I stored a certain amount of text files downloaded by some newsgroups; my desired_process = to clean all the files and copy them all in another directory; my desired_output = another directory in which there are all cleaned files; my problem = my scrip

Re: Net::Telnet -- Checking File Exists

2003-03-24 Thread Jeff Westman
--- Jeff Westman <[EMAIL PROTECTED]> wrote: > > my $result = ! $t->cmd( "test -f $testFile ; echo $?" ); > > Doesnt work. (makes no difference) In my question below, I should state that it always returns '1' irregardless if the file exists or not > --- "John W. Krahn" <[EMAIL PROTECTED]>

Re: Net::Telnet -- Checking File Exists

2003-03-24 Thread Jeff Westman
> my $result = ! $t->cmd( "test -f $testFile ; echo $?" ); Doesnt work. (makes no difference) --- "John W. Krahn" <[EMAIL PROTECTED]> wrote: > Jeff Westman wrote: > > > > How do you check if a file exists on a remote server using Net::Telnet ? > > > > I have tried: > > > > $testFile = "/tmp

RE: \ vs / vs %

2003-03-24 Thread Bakken, Luke
> system("expand perfc009.DA_ %windir%\\system32\\perfc009.DAT") Try this instead: system("expand perfc009.DA_ $ENV{'windir'}\\system32\\perfc009.DAT"); Luke -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

\ vs / vs %

2003-03-24 Thread Rosenstein, Leon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everyone, I am pretty new to perl so I assume you guys and girls will starting getting to know me really well. I have a one line snippet of code that I am trying to run. The system is win2k sp3. I am trying to run the expand command and pass t

Re: Net::Telnet -- Checking File Exists

2003-03-24 Thread John W. Krahn
Jeff Westman wrote: > > How do you check if a file exists on a remote server using Net::Telnet ? > > I have tried: > > $testFile = "/tmp/noFileExistsHere"; > > $result = $t->cmd("test -f $testFile ; print $? "); > $result = $t->cmd("test -f $testFile && print 1 || print 0"); > $result = $t->cmd

counting fork process, again

2003-03-24 Thread chad kellerman
Helloe everyone, I was wondering is someone can help me out with an issue with forking. I am trying to fork 8 process at a time. Here is what I have: #!/usr/bin/perl use strict; use warnings; use lib "."; use BACKUP; #my own module use POSIX ":sys_wait_h"; my( $MAX_CHILDREN ) = "8";

The Loop in this script is driving me crazy.

2003-03-24 Thread mel awaisi
Hi, The problem has been highlighted to me by a great person in this list, but i just cant solve it. I have this script that is not working as it should be. this is what it is supposed to be doing, take images from a directory (images are coming from camera) and renames them with the date and

RE: thanks for the help last time, could you help me again

2003-03-24 Thread Dan Muey
> Hi Dan Howdy, please post Perl questions to the list so we can all enjoy. > > I have this script that is not working as it should be. this > is what it is > supposed to be doing, take images from a directory (images > are coming from > camera) and renames them with the date and time of ima

Re: Problems matching filenames

2003-03-24 Thread John W. Krahn
Rob Dixon wrote: > > This will try to read from the filehandle and try to > print each line to the filehandle specified by $program. Note > that is case=sensitive, and isn't the same as , > but either way it's not open for input and the read will fail. Perl originally used the lower case fileha

RE: -w and warnings.pm

2003-03-24 Thread Dan Muey
Ok, let me simplify the question. Does the #!perl -w switch still work on Perl 5.6.0 and later? Thanks, Dan > Hello list, > > If I understand this right -w and warnings.pm do the same > thing except :: > > - warnings.pm is new to Perl 5.6.0 > - -w applies to the entire program and

Re: Using Devel::ptkdb module

2003-03-24 Thread Jeff Westman
Have you tried exporting PTKDB_CODE_FONT ? --- deb <[EMAIL PROTECTED]> wrote: > I have been using the Devel::ptkdb module on SunOS, which is a really fine > tool. However, the text in the code pane is extremely small. perldoc > has a list of environment variables which can be used to manipulat

Net::Telnet -- Checking File Exists

2003-03-24 Thread Jeff Westman
How do you check if a file exists on a remote server using Net::Telnet ? I have tried: $testFile = "/tmp/noFileExistsHere"; $result = $t->cmd("test -f $testFile ; print $? "); $result = $t->cmd("test -f $testFile && print 1 || print 0"); $result = $t->cmd("if [ -f $testFile ] ;then print 1; els

Re: Searching for the right regular expressions

2003-03-24 Thread scott . e . robinson
Thanks, Rob! I just sent out my proposed solution for 1.b and 1.c, and they basically match yours. Makes me feel good. Thanks for the one-step way to write it, too. By the way, do you have any array-less way to do 2 or 3 in the original post? 2 was to count the number of colon-delimited subst

Re: Using Print -strange behavior

2003-03-24 Thread Morten Liebach
On 2003-03-24 07:27:14 -0800, Ovid wrote: > --- Jose Luis Martinez <[EMAIL PROTECTED]> wrote: > > Hello Ovid > > > > This is the code that I am trying to run > > > > #!/usr/bin/perl > > > > my $a="Hello World"; > > > > print $a; > > There is nothing wrong with this code. Thoughts: > > * what

Re: Searching for the right regular expressions

2003-03-24 Thread scott . e . robinson
Rob, I found versions of 1.b. and 1.c. that seem to work, using the '|' operator. They're probably not the most elegant: Given a colon-delimited string such as my $string = ':B520:L201:M:MM:M260:8:88:G607:'; 1.b. Keep single-letter substrings and also any all-numeric substrings: my @wanted =

Re: Socket Problem

2003-03-24 Thread Stefan Johnson
On Sun, 23 Mar 2003 22:43:16 -0500, Mark G <[EMAIL PROTECTED]> wrote: Hi Stefan, If you have two different sockets open, one should not block the other no meter what kind of a socket that is. Send some of the code, might help us help you. Mark Ok, I replied to the previous response to my post and

Using Devel::ptkdb module

2003-03-24 Thread deb
I have been using the Devel::ptkdb module on SunOS, which is a really fine tool. However, the text in the code pane is extremely small. perldoc has a list of environment variables which can be used to manipulate X resources, and I tried, setenv PTKDB_CODE_FONT 9x12 And then I ran the

Re: Searching for the right regular expressions

2003-03-24 Thread Rob Dixon
Scott E Robinson wrote: > Hi, Rob! Amazing how quickly you coded those up! > > 1.a. works great. > > 1.b. doesn't quite work yet. The revised version (my @wanted = > $string =~ /\b\w\d*\b/ig;) seems to let everything pass through it. Sorry, I would say I'm having a bad day, but I'm not - I have

Re: FW: OLDB - ODBC

2003-03-24 Thread Michael A Chase
On Mon, 24 Mar 2003 17:12:39 +0100 "NYIMI Jose (BMB)" <[EMAIL PROTECTED]> wrote: > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, March 24, 2003 4:58 PM > To: [EMAIL PROTECTED] > Subject: OLDB - ODBC > > > Does this belong in the DBI list? Sorry i

Re: Searching for the right regular expressions

2003-03-24 Thread scott . e . robinson
Hi, Rob! Amazing how quickly you coded those up! 1.a. works great. 1.b. doesn't quite work yet. The revised version (my @wanted = $string =~ /\b\w\d*\b/ig;) seems to let everything pass through it. 1.c. - Sorry I wasn't clear. I need to keep the all-numeric substrings as well as keeping the

-w and warnings.pm

2003-03-24 Thread Dan Muey
Hello list, If I understand this right -w and warnings.pm do the same thing except :: - warnings.pm is new to Perl 5.6.0 - -w applies to the entire program and warnings.pm can be done block leveland stopped with 'no warnings;' So my questions is this. Does -w still work the sam

Re: rename in windows doesn't work

2003-03-24 Thread Jenda Krynicky
From: "Rosenstein, Leon" <[EMAIL PROTECTED]> > Currently the script reads: > opendir (DIR, "c:/temp") or die "Cant Open Temp Buddy Boy! \n"; > @filenames = readdir (DIR) or die "Can't Hold Filenames \n"; > foreach $name (@filenames) > {if ($name eq "blah.dat") {rename ($name, "blah.old") or die "

Re: Problems matching filenames

2003-03-24 Thread Rob Dixon
Papapep wrote: > I've made a small program that tries to get all the files from a > directory that's full of files that they have the name format : > pepe-1_DDMM.txt or pepe-2_DDMM.txt. > First, I am just trying to get them and print the array created. > Afterwards, when this works I'll do

Re: Searching for the right regular expressions

2003-03-24 Thread Stefan Lidman
[EMAIL PROTECTED] wrote: > > Dear Perl experts, > > I'm trying to find the right regular expressions to do some simple (?) > string processing. Can anyone tell me how to do these? #!/usr/bin/perl -lw use strict; > 1. Given a string consisting of substrings delimited by colons, such as > :B520:

FW: OLDB - ODBC

2003-03-24 Thread NYIMI Jose (BMB)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 4:58 PM To: [EMAIL PROTECTED] Subject: OLDB - ODBC Does this belong in the DBI list? Sorry if the answer is yes. * Hi, We have a problem. We run Perl for Window NT. We

Re: Searching for the right regular expressions

2003-03-24 Thread Rob Dixon
Hi. Rading your post again, it looks like I kinda screwed up. Lets try again! Rob Dixon wrote: > Hi Scott > > Scott E Robinson wrote: > > Dear Perl experts, > > > > I'm trying to find the right regular expressions to do some simple > > (?) string processing. Can anyone tell me how to do these? >

Re: Searching for the right regular expressions

2003-03-24 Thread Rob Dixon
Hi Scott Scott E Robinson wrote: > Dear Perl experts, > > I'm trying to find the right regular expressions to do some simple (?) > string processing. Can anyone tell me how to do these? > > 1. Given a string consisting of substrings delimited by colons, such > as :B520:L201:M:M260:8:G607:,

OLDB - ODBC

2003-03-24 Thread Murzc
Does this belong in the DBI list? Sorry if the answer is yes. * Hi, We have a problem. We run Perl for Window NT. We use Perl to read ASCII Files, and write the information to a Database. Some of these fields are longer than 32,000 characters long. We just had one that was

Problems matching filenames

2003-03-24 Thread papapep
I've made a small program that tries to get all the files from a directory that's full of files that they have the name format : pepe-1_DDMM.txt or pepe-2_DDMM.txt. First, I am just trying to get them and print the array created. Afterwards, when this works I'll do more things with the d

Re: Using Print -strange behavior

2003-03-24 Thread Ovid
--- Jose Luis Martinez <[EMAIL PROTECTED]> wrote: > Hello Ovid > > This is the code that I am trying to run > > #!/usr/bin/perl > > my $a="Hello World"; > > print $a; There is nothing wrong with this code. Thoughts: * what is the result of 'which perl'? Are you pointing to the same interpre

RE: Searching for the right regular expressions

2003-03-24 Thread [EMAIL PROTECTED]
2.if you mean the numbers of blocks between ":" then my @temp = split (":", $Line); print "Amount of blocks - ".scalar (@Temp), "\n"; 1.a. foreach (@Temp) { if (length ($Temp[$_] == 1) { $Temp[$_] = ""; } } 1.b. "unless" instead of "if" 1.c. a mix of 1.a & 1.b 3. Use 2 and compare blocks.

Searching for the right regular expressions

2003-03-24 Thread scott . e . robinson
Dear Perl experts, I'm trying to find the right regular expressions to do some simple (?) string processing. Can anyone tell me how to do these? 1. Given a string consisting of substrings delimited by colons, such as :B520:L201:M:M260:8:G607:, how can I a. remove the single-character and

RE: networking with perl

2003-03-24 Thread Dan Muey
> Hi Dan, Howdy, post to the list so we can all share :) > > I wrote a simple script that is sending a request to > localhost and receiving the response with LWP. > I wrote yesterday it was running fine on yesterday, > but as I am trying to run today it is ending up with > the error " 403 Forb

RE: networking with perl

2003-03-24 Thread Dan Muey
> Hi Dan, Hii, please post to the list so everyone can learn and help. > > I have a little more problem in running system command > from cgi file. Even I wrote a perl file so that I can > run the system command from the perl file. But the > perl file is also not executing the system command. I

Re: rename in windows doesn't work

2003-03-24 Thread Rob Dixon
Hi Leon "Leon Rosenstein" <[EMAIL PROTECTED]> wrote: > > I am having some problems with a script. > > Currently the script reads: > > opendir (DIR, "c:/temp") or die "Cant Open Temp Buddy Boy! \n"; Don't put \n on the end of a die string, otherwise the Perl interpreter won't tell you the line num

RE: rename in windows doesn't work

2003-03-24 Thread wiggins
On Mon, 24 Mar 2003 08:58:40 -0500, "Rosenstein, Leon" <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi everyone, > > I am having some problems with a script. > > Currently the script reads: > opendir (DI

Re: rename in windows doesn't work

2003-03-24 Thread Sudarshan Raghavan
On Mon, 24 Mar 2003, Rosenstein, Leon wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi everyone, > > I am having some problems with a script. > > Currently the script reads: > opendir (DIR, "c:/temp") or die "Cant Open Temp Buddy Boy! \n"; > @filenames = readdir (DIR) or di

rename in windows doesn't work

2003-03-24 Thread Rosenstein, Leon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everyone, I am having some problems with a script. Currently the script reads: opendir (DIR, "c:/temp") or die "Cant Open Temp Buddy Boy! \n"; @filenames = readdir (DIR) or die "Can't Hold Filenames \n"; foreach $name (@filenames) {if

Re: Printing epoch time

2003-03-24 Thread Scott R. Godin
Francesco Del Vecchio wrote: > how can I print the today date (DD MM YY HH MM SS) in epoch format? > > Frank perldoc -f time localtime gmtime perldoc Time::Local (<-- I think this is what you're after. if not, please clarify for us) POSIX (and search for the strf

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Pradeep Goel
Hi Rob Thanks a lot . You & the "remote partner " seems to be the two extremes . A really impressive mail with lot of positive attitude . Can you tell something more about LWP use for my solution i.e. how to transer a doc/html file automatically on daily basis from my windows machine to a uni

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Rob Dixon
"Pradeep Goel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > - Original Message - > From: "Janek Schleicher" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, March 24, 2003 2:57 PM > Subject: Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI > > > > Prade

Re: Database access & CGI

2003-03-24 Thread Francesco del Vecchio
--- Rob Dixon <[EMAIL PROTECTED]> wrote: > Hi Frank. > > We can only speculate as to what your problem may be > until we know a little more about your script. Can you post > an extract of what you think is the relevant area? > > Cheers, > > Rob Hi Rob...here you have the code: ==

Printing epoch time

2003-03-24 Thread Francesco del Vecchio
how can I print the today date (DD MM YY HH MM SS) in epoch format? Frank __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: Database access & CGI

2003-03-24 Thread Rob Dixon
"Francesco Del Vecchio" <[EMAIL PROTECTED]> wrote: > I wrote a small program accessing a Mysql database. > > All works fine when I run it from shell, but when I try to use it as CGI using > apache 2.0 I'm > having this kind of trouble: > > when he access to the database, looks like he append to t

Database access & CGI

2003-03-24 Thread Francesco del Vecchio
I wrote a small program accessing a Mysql database. All works fine when I run it from shell, but when I try to use it as CGI using apache 2.0 I'm having this kind of trouble: when he access to the database, looks like he append to the user name the domain...so if all works properly from shell w

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Rob Dixon
Pradeep Goel wrote: > Hi All ,pls answer if u know anything out of 3 different questions. Hello Pradeep. Welcome to perl.beginners. A lot of us here know a lot about Perl, and between us we can help you with almost any Perl problem that a Perl beginner might come across. > 1) > Can somebody give

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Pradeep Goel
- Original Message - From: "Janek Schleicher" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 24, 2003 2:57 PM Subject: Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI > Pradeep Goel wrote at Mon, 24 Mar 2003 11:24:15 +0530: > > > Hi All ,pls answer if u know anythi

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Janek Schleicher
Pradeep Goel wrote at Mon, 24 Mar 2003 11:24:15 +0530: > Hi All ,pls answer if u know anything out of 3 different questions. If you have 3 different questions, ask in 3 different articles, not in one ! > 1) > Can somebody give some pointers where to look for or any particularly > good one ( free

Re: Using Print -strange behavior

2003-03-24 Thread Janek Schleicher
Jose Luis Martinez wrote at Sun, 23 Mar 2003 15:04:42 -0800: > This is the code that I am trying to run > > #!/usr/bin/perl > > my $a="Hello World"; > > print $a; Runs fine for me, allthough I wouldn't use $a as a variable. (It's already a global variable used e.g. in sortings, see perldoc pe

Re: Using Print -strange behavior

2003-03-24 Thread Jose Luis Martinez
Hello Ovid This is the code that I am trying to run #!/usr/bin/perl my $a="Hello World"; print $a; Thanks, JL "Ovid" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > --- Jose Luis Martinez <[EMAIL PROTECTED]> wrote: > > Hello All > > > > I installed Linux 8.0(kernel 2.4.18-14) a