Re: perl equivalent of `trap'

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 06:43:34 GMT, Harry Putnam wrote: > Probably get horse whipped for this one, but what is the perl > equivalent of shell `trap' function. > > `perldoc -f trap' lets me know there isn't one of the same name. > > Where does one read about it? Read about 'Signals' in

perl help

2002-07-11 Thread Javeed SAR
> > HI, > > > i want to push the contents of array @MSG (Given below) to a file call > testblat.txt. > so that i can assign as follows: > $message = "testblat.txt "; > > How to do it?? > > > > > > > > > > > my @MSG = > ("Trigger activation mail notification for controlled actio

Re: How to do a consecutive grep?

2002-07-11 Thread Harry Putnam
Jeremy Vinding <[EMAIL PROTECTED]> writes: >> >> @array = ; >> @res_grep1 = grep /pattern1/, @array; >> @res_grep2 = grep /pattern1/, @res_grep1; >> @res_grep3 = grep /pattern1/, @res_grep2; >> > how about something like: > > @res = grep { /pattern1/ && /pattern2/ && /pattern3/ } ; Nobody has

Weekly list FAQ posting

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

re: open command

2002-07-11 Thread William Black
Hi all, I'm using the open command with the pipe. For some reason this doesn't work. Can anyone tell me why? open(MAIL,"| mail -s $subject $contact[0]->{email}") || die "can't create"; William Black _ MSN Photos is the easie

re: open command

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 12:03:06 GMT, William Black wrote: > I'm using the open command with the pipe. For some reason this > doesn't work. Can anyone tell me why? > > open(MAIL,"| mail -s $subject $contact[0]->{email}") || die "can't > create"; Works for me. Could you be more specific wrt "doesn

re: open command

2002-07-11 Thread William Black
The info in the two vars are correct. What doesen't work is when the email is sent it doesn't include the subject line and I can't tell why. William >From: Felix Geerinckx <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: re: open command >Date: 11 Jul 2002 12:24:31 - > >on Thu, 11 Jul

RE: Easy way to compare 2 perl lists (arrays)?

2002-07-11 Thread Bob Showalter
> -Original Message- > From: Rupert Heesom [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 11, 2002 5:54 AM > To: 'Bob Showalter' > Cc: [EMAIL PROTECTED] > Subject: RE: Easy way to compare 2 perl lists (arrays)? > > > Bob: > > I like your efficient solution, but I want to clarify what

Re: Date and Time

2002-07-11 Thread zentara
On Wed, 10 Jul 2002 11:52:55 -0400, [EMAIL PROTECTED] wrote: >This is what I have now. >... >The only problem seems to be the >use strict; directive >if I take this out it works fine > >So I guess I need to know if the use strict; directive is really >necessary and if so how do I get around

Re: "require" returns no value ?

2002-07-11 Thread zentara
On Thu, 11 Jul 2002 06:14:53 +0800, [EMAIL PROTECTED] (Connie Chan) wrote: >Hi all, > >I have an array like this >@path = >( 'C:\path1\script1.pl' , >'C:\path1\script2.pl' , >'C:\path2\script1.pl' , >'C:\path2\script2.pl' ); > >Then I tried this : >require "$_" for (@path); > >It goes fail

search and replace problem

2002-07-11 Thread Johnson, Shaunn
Howdy: I know this should be pretty simple, but I must be missing something in my code. I want to do the following: * get a list of files in a directory * open each file * search and replace the old pattern to a new pattern (should only be one occurrence) * close file * close dir * do next one

RE: open command

2002-07-11 Thread LoBue, Mark
> -Original Message- > From: William Black [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 11, 2002 5:32 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: re: open command > > > The info in the two vars are correct. What doesen't work is > when the email > is sent it doesn't

RE: search and replace problem

2002-07-11 Thread Nikola Janceski
You are only opening the file for read. If you want to change the file you have to write it somewhere. =) > -Original Message- > From: Johnson, Shaunn [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 11, 2002 10:52 AM > To: [EMAIL PROTECTED] > Subject: search and replace problem > > >

Need timegm sample

2002-07-11 Thread chris
use Time::Local; my $TimeInSeconds; #convert broken-down time to seconds in UTC $TimeInSeconds = timegm($sec,$min,$hour,$mday,$mon,$year,$wday,$yday); #snip snip snip When I use the following in perl 5.6.1, the script terminates immediately. What is wrong? $TimeInSeconds = timegm(0,0,0,$mday,

RE: Easy way to compare 2 perl lists (arrays)?

2002-07-11 Thread Rupert Heesom
Bob: I like your efficient solution, but I want to clarify what's actually happening in the line, especially the grep stuff. I know the { s// } is a substitution regexp. It's looking for a filename ending in ".tiff", then substituting ".pdf" for ".tiff". To me the subst regexp looks like a file

Script examples

2002-07-11 Thread zanardi2k2
Is there a resource for script examples on the Internet? I installed ActivePerl on a Win2k machines, are there any particular advice regarding using Perl on a Win32 system? Thank you all in advance. -- Zanardi2k2 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [E

Can Perl interact with XML?

2002-07-11 Thread Rupert Heesom
My company is probably going to be putting a data infrastructure together using XML. A colleague of mine talks about PHP which interacts with XML. I would like to know if Perl interacts with XML at all? I have several textbooks on Perl, including the "Perl Cookbook". I haven't found any con

RE: Need timegm sample

2002-07-11 Thread Nikola Janceski
What no error messages? Just terminates? What about using -w or use warnings? are you printing something? More info required. > -Original Message- > From: chris [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 10, 2002 9:17 PM > To: [EMAIL PROTECTED] > Subject: Need timegm sample > >

passing hash to a subroutine

2002-07-11 Thread rory oconnor
Is it possible to pass a hash into a subroutine to be used as a local variable? I'm trying to do this: ($rows, %results) = &Select($mytable, $where_f1, $compare1, $where_v1, @quick_check, %field_values); sub Select { my($db_table, $where_field, $comparison, $where_value,@fieldlist, %values) = @

Re: Using grep with Win32 perl?

2002-07-11 Thread David T-G
Anders, et al -- ...and then Anders Holm said... % % [snip] % % > Why do you think you can't do this? The command is all right and % > there is not reason why would grep() work differently under Unix and % > Windows. % > % > Jenda % % Jenda, I think he's thinking of the command line version of

Re: Can Perl interact with XML?

2002-07-11 Thread Janek Schleicher
Rupert Heesom wrote at Thu, 11 Jul 2002 13:49:56 +0200: > My company is probably going to be putting a data infrastructure together using XML. > A colleague > of mine talks about PHP which interacts with XML. > > I would like to know if Perl interacts with XML at all? I have several textbooks

Re: passing hash to a subroutine

2002-07-11 Thread George Schlossnagle
The last item that you pass to a perl subroutine can be a array or a hash, but none but the last, since oerl will greedy-match your arrays when you assign them in your subroutine. The way around this is to pass them in by reference: ($rows, %results) = &Select($mytable, $where_f1, $compare1,

RE: Using grep with Win32 perl?

2002-07-11 Thread Powell, Ron
Slightly OT: I did a google search some time ago and found a grep command line util for windows... A quick google today produced this link: http://www.interlog.com/~tcharron/grep.html Personally, since switching to linux at home, I find myself trying to use all manner of unix commands on my windo

Re: changing %ENV in parent

2002-07-11 Thread David T-G
Peter, et al -- ...and then Peter Scott said... % % At 08:37 AM 7/9/02 -0500, David T-G wrote: % > % >...and then Peter Scott said... % >% % >% At 09:33 AM 7/6/02 -0500, David T-G wrote: % >% >I want to add to $ENV{'PATH'} in the parent process from my script. ... % > `myscript.pl bash` % > `m

Re: Can Perl interact with XML?

2002-07-11 Thread Wiggins d'Anconia
Perl has a lot of resources for working with XML in most of the standard ways, aka DOM, SAX, etc. O'Reilly has a "Perl and XML" book that is a very good read for an experienced perl programmer (not advanced just experienced) which also provides a good overview of XML concepts in general. I wo

Re: Can Perl interact with XML?

2002-07-11 Thread Wiggins d'Anconia
Perl has a lot of resources for working with XML in most of the standard ways, aka DOM, SAX, etc. O'Reilly has a "Perl and XML" book that is a very good read for an experienced perl programmer (not advanced just experienced) which also provides a good overview of XML concepts in general. I wo

Re: "require" returns no value ?

2002-07-11 Thread Jenda Krynicky
> I have an array like this > @path = > ( 'C:\path1\script1.pl' , > 'C:\path1\script2.pl' , > 'C:\path2\script1.pl' , > 'C:\path2\script2.pl' ); > > Then I tried this : > require "$_" for (@path); > > It goes fail... > > Questions : > 1. How can I know if a "require" is success or not ? >

Re: search and replace problem

2002-07-11 Thread Chris Ball
> "Shaunn" == Shaunn Johnson writes: Shaunn> But nothing is happening (that I can see). What am I doing Shaunn> wrong? This is a FAQ. Your code seems fine in as far as it goes - it iterates through files, and modifies $_ with a regular expression occasionally. Here's the proble

Re: A few questions

2002-07-11 Thread Matija Papec
On 10 Jul 2002 11:06:03 -0400, [EMAIL PROTECTED] (Chas Owens) wrote: >> movie listing and when one item is selected via remote, 'system' >> invokes mplayer which leaves main gtk window blank after it finishes? >> :) > >Perl 5.6.x is not threaded, so anything that blocks (like system) will >keep t

printing to 2 seperate places simultaneously

2002-07-11 Thread HENRY,MARK (HP-Roseville,ex1)
Hi All, I want a script to print log messages to a file, and within the same statement, to the screen (STDOUT) simultaneously. Can the print statement be coerced into doing this, or is there another way of achieving the same result? Many thanks, Mark -- To unsubscribe, e-mail: [EMAIL PROTECT

Re: search and replace problem

2002-07-11 Thread Jeff 'japhy' Pinyan
On Jul 11, Johnson, Shaunn said: >* open each file >* search and replace the old pattern to a new pattern >(should only be one occurrence) >* close file You're not storing the results anywhere. You can't expect Perl to modify the file for you automagically. >But nothing is happening (that I ca

Re: passing hash to a subroutine

2002-07-11 Thread Jeff 'japhy' Pinyan
On Jul 11, rory oconnor said: >Is it possible to pass a hash into a subroutine to be used as a local >variable? I'm trying to do this: The arguments sent to a function are flattened into one big list. There's no way to know where your array ends and your hash begins. Furthermore, doing $x

Re: Can Perl interact with XML?

2002-07-11 Thread Joe Raube
Also see the columns on xml.com http://www.xml.com/pub/q/perlxml -Joe --- Wiggins d'Anconia <[EMAIL PROTECTED]> wrote: > Perl has a lot of resources for working with XML in most of the > standard > ways, aka DOM, SAX, etc. O'Reilly has a "Perl and XML" book that > is a > very good read for an

Re: passing hash to a subroutine

2002-07-11 Thread Jenda Krynicky
From: George Schlossnagle <[EMAIL PROTECTED]> > The last item that you pass to a perl subroutine can be a array or a > hash, but none but the last, since oerl will greedy-match your arrays > when you assign them in your subroutine. The way around this is to > pass them in by reference: > > ($row

Re: What is this string type? How to play with?

2002-07-11 Thread perl-dvd
Connie, Something like the following is probably what you are looking for. Of course what you should be doing is using CGI.pm or some other tested form of input retrieval. my @variables = split(/[\&\;]/, $input); fo

Re: Script examples

2002-07-11 Thread Connie Chan
You better know what do you need first.. but if you want to know what you can demand, you may reference to : C:\YourPerlFolder\html\site\lib\Win32 C:\YourPerlFolder\html\site\lib\Win32API after you know what are libs inside, you can look up example for certain purpose by search engine. Rgds, Co

RE: Am I being stupid here... or?

2002-07-11 Thread drieux
On Thursday, July 11, 2002, at 07:17 , Jason Frisvold wrote: > Does this do what I think it does? Namely, converts the == or eq to the > proper operator based on the type of call being made? jason thought I would toss this back at the list... [..] I presume you are asking about: >> or adopt

Optimize some regex's

2002-07-11 Thread Jackson, Harry
Can anyone make this a bit faster for me. I am loading a database from Oracle into mysql (dont ask). These conversions are taking a long time and are making the browser time out. The $table_name[7] is a worklog that can be 2000 characters long and $table_name[2] is an epoch date. while (@table_n

RE: Optimize some regex's

2002-07-11 Thread Shishir K. Singh
Try using the fetchrow_arrayref. I think it's faster as it does not have to copy the variables. Since your length is 2000, it may help a lot. -Original Message- From: Jackson, Harry [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 12:10 PM To: '[EMAIL PROTECTED]' Subject: Opti

Re: printing to 2 seperate places simultaneously

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 15:49:59 GMT, Mark Henry wrote: > I want a script to print log messages to a file, and within the same > statement, to the screen (STDOUT) simultaneously. Can the print > statement be coerced into doing this, or is there another way of > achieving the same result? If you hav

SOLVED: RE: search and replace problem

2002-07-11 Thread Johnson, Shaunn
--thanks all (chris, jeff, nikola) --jeff: your suggestion worked like elfin magick. thanks! --(note: i had to do this twice ... in the search pattern --i forgot the "$" in "newpattern" ... oops.) --anyways ... -X -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]

Re: Optimize some regex's

2002-07-11 Thread Jenda Krynicky
From: "Jackson, Harry" <[EMAIL PROTECTED]> > Can anyone make this a bit faster for me. I am loading a database from > Oracle into mysql (dont ask). These conversions are taking a long time > and are making the browser time out. The $table_name[7] is a worklog > that can be 2000 c

Re: printing to 2 seperate places simultaneously

2002-07-11 Thread Jenda Krynicky
From: "HENRY,MARK (HP-Roseville,ex1)" <[EMAIL PROTECTED]> > I want a script to print log messages to a file, and within the same > statement, to the screen (STDOUT) simultaneously. Can the print > statement be coerced into doing this, or is there another way of > achieving the s

removing non-printable char

2002-07-11 Thread Steven_Massey
Hi all I am trying to create a sub routine to remove non-printable chars from a string, and am stuck on how I should app roach this. Any thoughts ?? Much appreciated.. Steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: removing non-printable char

2002-07-11 Thread Jeff 'japhy' Pinyan
On Jul 11, [EMAIL PROTECTED] said: >I am trying to create a sub routine to remove non-printable chars from a >string, and am stuck on how I should approach this. Well, you don't need a subroutine -- just a substitution. If you're using perl 5.6, you can do: $string =~ s/[[^:print:]]+//g; B

Use vs Require

2002-07-11 Thread Jeff
I'm new to perl, but have a background in C. Can someone tell me what is the difference between 'use' and 'require'? When do you use one and not the other? Seems they both are comparable to a C header file (.h). Thanks in advance. Jeff __

Matching IPs or robots

2002-07-11 Thread KEVIN ZEMBOWER
I'm trying to do a quick-n-dirty (well, I've been at work on it three hours now) analysis of Apache web logs. I'm trying to count the number of records from robots or spiders. For my purposes, a robot or spider is a request from either an unresolved IP address, or one that has "bot", "spider", "cr

RE: Use vs Require

2002-07-11 Thread Shishir K. Singh
>I'm new to perl, but have a background in C. >Can someone tell me what is the difference between 'use' and 'require'? When do you >use one and not the other? Seems they both are comparable to a C header file (.h). >Thanks in advance. use is resolved during compile time whereas require is

use strict - config file?

2002-07-11 Thread rory oconnor
I want to "use strict" in a script I'm writing. I have a separate config file I am using (require "config.pl";) with a bunch of global variables. But my script doesn't seem to want to recognize those variables unless they are actually declared in the body of the script itself. I tried using "my

Re: removing non-printable char

2002-07-11 Thread Steven_Massey
Jeff - thanks I will try it out. your answer raises another Q. what would I type in perldoc -format to be able to dig for that info ??? "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> on 07/11/2002 05:42:40 PM Please respond to [EMAIL PROTECTED] To:[EMAIL PROTECTED] cc:

RE: printing to 2 seperate places simultaneously

2002-07-11 Thread Timothy Johnson
Or if you don't have the option of installing a new module, you can make a poor man's version with a sub. The example below will take a string passed to it and print it to tee.txt and the screen. ### sub Tee{ open(TEEFILE,">>tee.txt"); print TEEFILE $_[0

Re: removing non-printable char

2002-07-11 Thread Jeff 'japhy' Pinyan
On Jul 11, [EMAIL PROTECTED] said: > what would I type in perldoc -format to be able to dig for that >info ??? Regex-related stuff is in perlre. perldoc perlre -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perl

Re: perl help

2002-07-11 Thread Tim Musson
Hey Javeed, My MUA believes you used Internet Mail Service (5.5.2653.19) to write the following on Thursday, July 11, 2002 at 5:06:22 AM. >> i want to push the contents of array @MSG (Given below) to a file call >> testblat.txt. Running Blat are you? -- just curious, why are you using perl to

RE: Use vs Require

2002-07-11 Thread Peter Scott
At 01:27 PM 7/11/02 -0400, Shishir K. Singh wrote: > >I'm new to perl, but have a background in C. > > >Can someone tell me what is the difference between 'use' and > 'require'? When do you > >use one and not the other? Seems they both are comparable to a C > header file (.h). > > >Thanks in a

RE: Use vs Require

2002-07-11 Thread Bob Showalter
> -Original Message- > From: Jeff [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 11, 2002 1:24 PM > To: [EMAIL PROTECTED] > Subject: Use vs Require > > > I'm new to perl, but have a background in C. > > Can someone tell me what is the difference between 'use' and > 'require'? When

Global/local variable declaration

2002-07-11 Thread Rory O'Connor
I want to "use strict" in a script I'm writing. I have a separate config file I am using (require "config.pl";) with a bunch of global variables. But my script doesn't seem to want to recognize those variables unless they are actually declared in the body of the script itself. I tried using "my

Re: use strict - config file?

2002-07-11 Thread Peter Scott
At 12:27 PM 7/11/02 -0500, rory oconnor wrote: >I want to "use strict" in a script I'm writing. I have a separate >config file I am using (require "config.pl";) with a bunch of global >variables. But my script doesn't seem to want to recognize those >variables unless they are actually declared i

Fw: Re: Date and Time

2002-07-11 Thread jffusion
first off let me say thank you for the help I know I am a pest, but I am learning a lot Anyway I fixed everything so it works fine in my editor However now it refuses to work in my browser. I keep getting an error 500 Which I can only assume is because of my html header. I checked the subject in

Re: use strict - config file?

2002-07-11 Thread rory oconnor
Peter, Thanks so much for the help! Unfortunately I am not using 5.6. I'd like to, but it's not up to me to do the upgrading! Which parts are 5.6-only, and how can I work around? Thanks, Rory On Thu, 2002-07-11 at 13:09, Peter Scott wrote: > At 12:27 PM 7/11/02 -0500, rory oconnor wrote: > >

RE: What is this string type? How to play with?

2002-07-11 Thread Nikola Janceski
[offtopic] STOP THE CROSS POSTING MADNESS you will notice that I removed perl-cgi from this reply. Please use this to continue the thread. Thank you > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 11, 2002 2:01 PM > To: Connie Chan; [EMAI

Re: Global/local variable declaration

2002-07-11 Thread Connie Chan
Right, I have facing the same problem too... and I just use this method to overcome : # globalVars.pl use strict; sub tellPath { my ($request) = @_; my %GlobalVars; $GlobalVars{PathA} = '/usr/bin/perl/'; $GlobalVars{PathB} = '/usr/home/'; . if ($request)

Re: Global/local variable declaration

2002-07-11 Thread Jeff 'japhy' Pinyan
On Jul 11, Rory O'Connor said: >I want to "use strict" in a script I'm writing. I have a separate >config file I am using (require "config.pl";) with a bunch of global >variables. But my script doesn't seem to want to recognize those >variables unless they are actually declared in the body of t

Re: Global/local variable declaration

2002-07-11 Thread Jeff 'japhy' Pinyan
On Jul 12, Connie Chan said: ># globalVars.pl >use strict; >sub tellPath >{ my ($request) = @_; > my %GlobalVars; > >$GlobalVars{PathA} = '/usr/bin/perl/'; >$GlobalVars{PathB} = '/usr/home/'; >. > > if ($request) { return $GlobalVars{$request} } >else { r

source a script from with perl

2002-07-11 Thread Carson Wilcox
I have a need to source a ksh script from within a perl script. Does anyone know if this is possible and how to do it. Thanks, Carson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: use strict - config file?

2002-07-11 Thread Peter Scott
At 01:19 PM 7/11/02 -0500, rory oconnor wrote: >Peter, > >Thanks so much for the help! Unfortunately I am not using 5.6. I'd >like to, but it's not up to me to do the upgrading! Which parts are >5.6-only, and how can I work around? Altered for 5.004... if your perl is older than that, it's tim

Re: Global/local variable declaration

2002-07-11 Thread Connie Chan
H Thanks alot, I just learnt 'our' from this case. But perhaps I still not know in depth of 'our', so I still have something wondering... What will happen when I use 'our' in the required file, and also so the same var name in the entire script ? Isn't it confusing ? Maybe I am using a d

Re: use strict - config file?

2002-07-11 Thread rory oconnor
Thanks so much for your help Peter. I'm getting a grasp of this. However, I have been using a separate file containing subroutines shared by a few scripts. They have worked previously because I was just requiring it, and all my variables were global. I set up my config file as a package (thank

Syntax error in Win32:CopyFile()

2002-07-11 Thread Rupert Heesom
Hi all: I'm stuck again! I'm trying to copy a file using Win32::CopyFile, and the ActiveState debugger actually lets me run the script without complaining Until I get to the "said" line! The "stdout" error I get is: "C:\Perl\TIFFPDF>perl -d tiffpdf.pl usage: Win32::CopyFile($from, $to, $o

Is there a perl module that allows access to Notes on NT box from a Red hat Box

2002-07-11 Thread FLAHERTY, JIM-CONT
Is there a perl module that allows access to Notes on NT box from a Red hat Box?

setting permissions in open

2002-07-11 Thread Wiggins d'Anconia
Couple questions about the default setting of permissions on files written with "open" Background: I have a long time running cgi script that takes multipart uploads of files and stores them to the local server. Below is *almost* the exact code I have written (post input checking, permissi

Re: use strict - config file?

2002-07-11 Thread Peter Scott
At 03:02 PM 7/11/02 -0500, rory oconnor wrote: >Thanks so much for your help Peter. I'm getting a grasp of this. > >However, I have been using a separate file containing subroutines shared >by a few scripts. They have worked previously because I was just >requiring it, and all my variables were

How to pipe perl script

2002-07-11 Thread mperl
hello, my current project involves piping data to the perl script. perlscript.pl | cat data_file but unfortunately, the data_file is printed out by cat command how would i pipe data to perl script so that only the program did the output? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Re: Syntax error in Win32:CopyFile()

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 19:47:35 GMT, Rupert Heesom wrote: > I'm stuck again! > > "C:\Perl\TIFFPDF>perl -d tiffpdf.pl > usage: Win32::CopyFile($from, $to, $overwrite) at tiffpdf.pl line 39, > line 6." > > The code line is: Win32::CopyFile $CurrTIFFDir."\\".$_.".tif", > $WorkDir."\\ImageMagick";

Re: How to pipe perl script

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 20:35:45 GMT, wrote: > hello, my current project involves piping data to the perl script. > > perlscript.pl | cat data_file > > but unfortunately, the data_file is printed out by cat command If you want to pipe data *to* the Perl program, it should be on the right of the

RE: How to pipe perl script

2002-07-11 Thread Nikola Janceski
you are piping the wrong way. cat data_file | perlscript.pl =) > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 11, 2002 4:36 PM > To: [EMAIL PROTECTED] > Subject: How to pipe perl script > > > hello, my current project involves piping d

Re: setting permissions in open

2002-07-11 Thread Wiggins d'Anconia
So often your question has the answer :-)naturally after some more thought I checked to see if perl had a builtin for chmod, and to little surprise it did. So I am now using perl's builtin chmod and things are happy again, however, I am still curious about open's ability to do this rather

Re: Optimize some regex's

2002-07-11 Thread John W. Krahn
Jenda Krynicky wrote: > > From: "Jackson, Harry" <[EMAIL PROTECTED]> > > Can anyone make this a bit faster for me. I am loading a database from > > Oracle into mysql (dont ask). These conversions are taking a long time > > and are making the browser time out. The $table_name[7]

Re: removing non-printable char

2002-07-11 Thread John W. Krahn
Jeff 'Japhy' Pinyan wrote: > > On Jul 11, [EMAIL PROTECTED] said: > > >I am trying to create a sub routine to remove non-printable chars from a > >string, and am stuck on how I should approach this. > > Well, you don't need a subroutine -- just a substitution. > > If you're using perl 5.6, yo

Re: How to pipe perl script

2002-07-11 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > hello, my current project involves piping data to the perl script. > > perlscript.pl | cat data_file > > but unfortunately, the data_file is printed out by cat command > > how would i pipe data to perl script so that only the program did the > output? perlscript.

Re: Matching IPs or robots

2002-07-11 Thread John W. Krahn
Kevin Zembower wrote: > > I'm trying to do a quick-n-dirty (well, I've been at work on it three > hours now) analysis of Apache web logs. I'm trying to count the number > of records from robots or spiders. For my purposes, a robot or spider is > a request from either an unresolved IP address, or

Re: What is this string type? How to play with?

2002-07-11 Thread Connie Chan
Hi David, Hehe... Thanks in advice. Anyway what I am looking for is making those stuff back to what they looks like when they come, that is, the $input in your script... However, may I have some questions about your sample ? =) > my @variables = split(/[\&\;]/, $input); ; has no problem, why y

Re: What is this string type? How to play with?

2002-07-11 Thread perl-dvd
Connie, > ; has no problem, why you would like to escape( \ )it ? I know that = and ; don't have a problem, I escape them because I escape every special character, that way I don't have to worry about what I do and don't need to escape. I know, bad habit (old habits die hard). > Besides, if y

Re: What is this string type? How to play with?

2002-07-11 Thread perl-dvd
Oops, let me make one small revision to my code: if (exists($form_vars{$name})) { # if this is the first of this form input name. should be if (!exists($form_vars{$name})) { # if this is the first of this form input name. Sorry about that all. Regards, David - Original Message - Fro

Re: What is this string type? How to play with?

2002-07-11 Thread perl-dvd
Sorry, one more oops $form_vars{$name} = [($form_vars{$name})] if (ref($form_vars{$name} ne "ARRAY")); should be $form_vars{$name} = [($form_vars{$name})] if (ref($form_vars{$name}) ne "ARRAY"); Sorry about these, there were a few recommendations I've received, and I had not implemented them

installing perl to specific directory - crucial

2002-07-11 Thread devetha
Hi, How do you install PERL to a specific directory? I'm using Unix and don't have permissions to /usr/local/bin. I followed the steps from perl.com but they didn't work. Could some provide me with directions of how to do this exactly? It's crucial that I get this down within the next hour

fastest regexp: split or (.*)?

2002-07-11 Thread Paul Tremblay
I am writing a script to parste rtf into xml and have a number of questions about regular expressions. The first is: I have this line: \sbknone\linemod0\linex0\cols1\endnhere \pard\plain text\par I want to split it at the expression "\endnhere". I can either use @array = split(/endnhere/,2);

Re: installing perl to specific directory - crucial

2002-07-11 Thread Peter Scott
At 09:02 PM 7/11/02 +, devetha wrote: >Hi, > >How do you install PERL to a specific directory? > >I'm using Unix and don't have permissions to /usr/local/bin. I >followed the steps from perl.com but they didn't work. > >Could some provide me with directions of how to do this exactly? I do

Re: fastest regexp: split or (.*)?

2002-07-11 Thread Jenda Krynicky
From: Paul Tremblay <[EMAIL PROTECTED]> > I am writing a script to parste rtf into xml and have a number of > questions about regular expressions. > > The first is: > > I have this line: > > \sbknone\linemod0\linex0\cols1\endnhere \pard\plain text\par > > I want to split it at the expression

Re: Matching IPs or robots

2002-07-11 Thread George Schlossnagle
Not to stray OT, but that seems like poor logic for counting spiders. The IP address I'm sending this mail from now is not reverse-resolvable, but I'm certainly not a bot. If you're relying on people's honesty in naming choices (e.g. the /(spider|crawl|search|bot)/ domain matching), wouldn't

: VIM: How do you place abbreviations in permanent memory?

2002-07-11 Thread LRZ
I created the abbreviation foo to represent #!/usr/bin/perl. It works if I hit any non character key (ex. shift) and then type foo.Though it only works for the time that that particular emulation terminal is running. When a new emulation window is open, that abbreviation is forgotten. How do I k

Regular Expressions and a poorly organized logfile

2002-07-11 Thread Scott, Joshua
Title: Message Hello everyone,  first I'd like to say thank you to everyone who responded to my issue with Avoiding Duplicate Entries.  I took the advice given and found a solution. Thank you very much!   My latest problem has to do with regular expressions and the logfile that Norton Antivi

Re: How to pipe perl script

2002-07-11 Thread drieux
On Thursday, July 11, 2002, at 01:35 , [EMAIL PROTECTED] wrote: > hello, my current project involves piping data to the perl script. > > perlscript.pl | cat data_file > > but unfortunately, the data_file is printed out by cat command > > how would i pipe data to perl script so that only the prog

Re: Is there a perl module that allows access to Notes on NT box from a Red hat Box

2002-07-11 Thread drieux
On Thursday, July 11, 2002, at 01:13 , FLAHERTY, JIM-CONT wrote: > Is there a perl module that allows access to Notes on NT box from a Red > hat > Box? I tried a search of the CPAN http://search.cpan.org/search?mode=module&query=Notes and didn't get anything. How would you access Lo

Re: : VIM: How do you place abbreviations in permanent memory?

2002-07-11 Thread Wiggins d'Anconia
I may not be understanding correctly, but I think you mean mapping a key(s)?? If that is the method which you are using you can add the same key sequence into your .vimrc file located in your home directory. It is my understanding that any ":" command can be placed in that file to setup the i

Re: Matching IPs or robots

2002-07-11 Thread Wiggins d'Anconia
Possibly but possibly not, my previous employer used a self written spider that we often populated with a standard USER_AGENT for instance mozilla's or IE's so that we would be sure to get a real representation of the page/script at the other end. Other times this didn't matter as much to us

Re: How to pipe perl script

2002-07-11 Thread Peter Scott
At 06:05 PM 7/11/02 -0700, drieux wrote: >On Thursday, July 11, 2002, at 01:35 , [EMAIL PROTECTED] wrote: > >>hello, my current project involves piping data to the perl script. >> >>perlscript.pl | cat data_file >> >>but unfortunately, the data_file is printed out by cat command >> >>how would i

Re: fastest regexp: split or (.*)?

2002-07-11 Thread drieux
On Thursday, July 11, 2002, at 03:51 , Jenda Krynicky wrote: [..] > > This may be written > > ($first_part_of_line, $second_part_of_line) > = split(/endnhere/,2); > >> Or: >> >> $line=~/(.*?)endnhere(.*); >> $first_part_of_line = $1; >> $second_part_of_line = $2; >> >> Which is quickest? I

Re: How to pipe perl script

2002-07-11 Thread drieux
On Thursday, July 11, 2002, at 06:58 , Peter Scott wrote: > At 06:05 PM 7/11/02 -0700, drieux wrote: [..] >> is your question: >> >> cat data_file | perlscript.pl > > Randal must be off his feed, he hasn't replied to any of the messages > that do this :-) Here, I'll just give the refer

Re: Regular Expressions and a poorly organized logfile

2002-07-11 Thread Connie Chan
MessageFrom you log file, I see there a blank line at head, so remove it first. Second, I see the location and virus name is warped by 2 line, is that you made it, or NV did this ? If that's the fact that location and virus name are warped by itself, you may try this do { $loc = ; $virNm =

About Spreadsheet.

2002-07-11 Thread dannyqchen
Hi, I am working on Sun Unix system. I want to use Perl to do the following tasks: 1) Automatically detect the new spreadsheet files (from StarOffice, could be in .csv format) in a specified directory. 2) Locate a specified column in the spreadsheet. 3) Extract the column, clean it, and save th

  1   2   >