how to end download file

2002-01-25 Thread Belinda M. Giardine
Hi. I have read the manual and FAQ and have this almost working but I am missing something. My CGI uses cookies to save a users querys on a database but I want to allow the user to also store this in regular file. (The cookie is set to expire in 7 days) In the docs for CGI.pm it says to use a

Re: Error on installation

2002-01-25 Thread Martin Redington
Remove the references to xmlwf from the Makefile. xmlwf is an application that uses expat to check xml files for well-formedness. You don't need it to use the expat library. expat should then build and install cleanly. On Friday, January 25, 2002, at 10:38 AM, Jeremy Schwartz wrote: I am

Code Format Question

2002-01-25 Thread Darryl Schnell
This may not be the place to ask this question so forgive me. I know a few people who are obsessed with the way their perl code is formatted and I was wondering what does actual good readable perl code and bad formatted perl code look like? I usually have my code looking something like this:

Re: Scalars

2002-01-25 Thread Jeff Bisbee
* Naveen Parmar ([EMAIL PROTECTED]) wrote: Why are the following 2 invalid scalar assignments? B. $17april = $dayDay 2; C. $april.17 = $dayDay 2; TIA, - NP Looks like homework to me :) -- ___vvz __ (_, ` ) ( )Jeff Bisbee#!/usr/bin/perl -w `~~~) )/\ [EMAIL

RE: Scalars

2002-01-25 Thread Ben LaRue
the seond char must be a letter and you can't have a . in a variable name -Original Message- From: Naveen Parmar [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 3:06 PM To: [EMAIL PROTECTED] Subject: Scalars Why are the following 2 invalid scalar assignments? B. $17april =

simple perl question

2002-01-25 Thread Stuart Clark
Hi Please help if you can. Thanks again Stuart Clark How do I add all the number between the a and the z My output file only gives me the instances of the matching pattern and not the total # start of file test 3034364717283459322a15.32zM042001H 3045434551648534245a243.56zM

Processing a text file

2002-01-25 Thread Morgan Norell
Hi I need help with this: I have a text file looking like this username || password[EMAIL PROTECTED] username || password[EMAIL PROTECTED] username || password[EMAIL PROTECTED] I need a perl program who makes a file of each domainX.com in a separate

RE: simple perl question

2002-01-25 Thread John Edwards
This line $total += /a([\d.]+)z/; is adding the number of successful matches (1 for each iteration in this case) of the regex to $total. There are three lines, three matches. You need to store the result of the regex as a list value, not scalar. while (IN) { ($match) = /a([\d.]+)z/;

RE: simple perl question

2002-01-25 Thread John Edwards
Oh. One more thing. Your regex should have the . escaped. Currently it is matching on either a number or *any character* between the a and z. Although this works, it may bite you if you have a line like this... 3034364717283459322a15f32zM042001H which you don't want to include in the

Re: Processing a text file

2002-01-25 Thread Jon Molin
Morgan Norell wrote: Can anyone give me some hints how to do this I'am totaly lost. read about files and regexps. There's a good book called 'learning perl' you should check out. If you're not interested in buying books, check the online info and perldoc. If you're not interested in

Re: Code Format Question

2002-01-25 Thread Jon Molin
Darryl Schnell wrote: This may not be the place to ask this question so forgive me. I know a few people who are obsessed with the way their perl code is formatted and I was wondering what does actual good readable perl code and bad formatted perl code look like? I usually have my code

Re: Processing a text file

2002-01-25 Thread Sudarsan Raghavan
Morgan, You will have to refer the manpages for these functions 1) split (perldoc -f split) 2) open (perldoc -f open) 3) chomp (perldoc -f chomp) The way to do this would be 1) Read in every line of the text file and chomp of the newline 2) Split the line such that you end up an array like this

Changing type in FTP session

2002-01-25 Thread ekayes
I'm running a script which uses the Net::FTP module to run FTP sessions on both UNIX and Vax/VMS boxes. I'm having problems trying to change the type of data transfer. Extracts from the script follows .. .. $host = x; $user = xxx; $password = xx; $type1 = ascii; $type2 = binary; ..

CGI and tables ?

2002-01-25 Thread Martin A. Hansen
hi im trying to build a webpage with perl CGI the object way... the only documentation i have looked at is man CGI can anyone recommend some online documentation? anyway: is it possible to render a table with something like: print $newCGI-start_table(-border='1'); print

Re: simple perl question

2002-01-25 Thread Frank
On Fri, Jan 25, 2002 at 01:58:00PM +1100, Stuart wrote: Hi Please help if you can. Thanks again Stuart Clark How do I add all the number between the a and the z My output file only gives me the instances of the matching pattern and not the total # start of file test

Re: CPAN locks up my hard drive.

2002-01-25 Thread Frank
On Thu, Jan 24, 2002 at 10:24:16AM -0800, Shaun wrote: I have used the CPAN network at least 6 times and every single time, about 2 hours after I finish I my hard drives lock up and the system goes down. It is a Maxtor 7200 RPM 30G drive, on Red Hat 7.2. It has a 1.2 Ghz processor and

RE: sending email - Mail::Sender and Mail::Sendmail

2002-01-25 Thread Gary Hawkins
http://search.cpan.org/doc/JENDA/Mail-Sender-0.7.10/Sender.pm.html and sending mail took a bit of code like this: Implied... use Mail::Sender; ref ($sender = new Mail::Sender({from = '[EMAIL PROTECTED]', smtp = 'company.com'})) or die $Mail::Sender::Error\n; (ref ($sender-MailMsg( {

Re: sending email - Mail::Sender and Mail::Sendmail

2002-01-25 Thread Rex Arul
Well I'm just wondering if there is much difference between Sender and Sendmail: I guess, the simplicity of sending mail attachments is laudable with Mail::Sender, whereas you have to work out a bit more in Mail::Sendmail to make attachments work! The same reason behooves well for sending

Grant a right to User in NT

2002-01-25 Thread Veeraraju_Mareddi
Dear All, Is there any way to grant a NT right to User using the Script.Any module for this purpose Thanks and Regards Raju M.V ** This email (including any attachments) is intended for the sole use of the intended

another simple question

2002-01-25 Thread Stuart Clark
Hi Please help if you can. Kind Regards Stuart Clark How do I delete each line in the test file that has 15 numbers and/or letters followed by 3 whitespace characters. The following file has the above situation on the first two lines # start of file test ccyymmdd4534323 043392H

accessing to a DSN system

2002-01-25 Thread mb
hi, I'm asking to connect to a DSN system (on windows98) ... I ceated a DSN file so to get connection on it. and when excecuting the small lignes bellow . #!/perl/bin/perl use Win32::ODBC; my($db) = new Win32::ODBC(ConnectGestion100;UID=mouna;PWD=mennou;); $db-Sql(SELECT * FROM F_ARTICLE);

Re: another simple question

2002-01-25 Thread Jonathan E. Paton
Hi, You want something like: while (IN) { print OUT unless /^\w{15}\s{3}/; } Jonathan Paton __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To

RE: simple perl question

2002-01-25 Thread Jeff 'japhy' Pinyan
On Jan 25, John Edwards said: Your regex should have the . escaped. Currently it is matching on either a number or *any character* between the a and z. Although this works, it may bite you if you have a line like this... Regex metacharacters all lose their meaning inside a character class.

Re: Code Format Question

2002-01-25 Thread Jenda Krynicky
From: Darryl Schnell [EMAIL PROTECTED] This may not be the place to ask this question so forgive me. I know a few people who are obsessed with the way their perl code is formatted and I was wondering what does actual good readable perl code and bad formatted perl code look

Re: accessing to a DSN system

2002-01-25 Thread Jenda Krynicky
From: mb [EMAIL PROTECTED] I'm asking to connect to a DSN system (on windows98) ... I ceated a DSN file so to get connection on it. Beg your pardon? What excatly did you create? A User DSN? A System DSN? A File DSN? and when excecuting the small lignes bellow .

please Help ! Database connection

2002-01-25 Thread mb
Hi, I just need when does this kind of error is raised : [Fri Jan 25 15:16:29 2002] [error] [client 127.0.0.1] malformed header from script. Bad header=Error connecting to gestion100: c:/phpweb/cgi-bin/majbd.cgi Kind Regards, asma

RE: please Help ! Database connection

2002-01-25 Thread John Edwards
This looks like your script isn't returning the correct HTML headers. It's not a database connection fault. I would strongly suggest using the CGI.pm module. This provides an easy interface to all things CGI. All this to the top of your script. use CGI qw(:standard); use CGI::Carp

Re: please Help ! Database connection

2002-01-25 Thread Jon Molin
or do: print Content-type: text/html\n\n; /Jon John Edwards wrote: This looks like your script isn't returning the correct HTML headers. It's not a database connection fault. I would strongly suggest using the CGI.pm module. This provides an easy interface to all things CGI. All this to

RE: please Help ! Database connection

2002-01-25 Thread John Edwards
Yes, but use CGI::Carp qw(fatalsToBrowser); will print most perl error messages to the html output. This is very useful if you are trying to develop a CGI script remotely. Once you start using the other features of the module, it makes CGI development fly along. Even though there is overhead in

perl matlab?

2002-01-25 Thread yun yun
Can Perl call the function in matlab? Or if there are some api which enable use to matlab's abundent graphics function in perl programming? Thanks! _ Do You Yahoo!? µÇ¼Ãâ·ÑÑÅ»¢µçÓÊ! http://mail.yahoo.com.cn font

Re: Count Words (from tue . . . little behind)

2002-01-25 Thread Dave Rankin
Hi Everybody, I'm working through the Mastering Regular Expressions book right now, so after reading the question earlier this week about finding the number of unique words in some input and the really great responses everybody sent, I wondered if I couldn't think of another way to do this

Size of directory

2002-01-25 Thread gross, cedric
Hello, I don't reach understand how I could obtain the size of a given directory and all the sub-directory.. Is there a function doing that ? or Is somebody have a sub doing that ? Another question : What is the meanning of this 512 bytes for a directory when I do a LL on my unix system ?

RE: perl matlab?

2002-01-25 Thread marcus_holland-moritz
| Can Perl call the function in matlab? Or if there are | some api which enable use to matlab's abundent | graphics function in perl programming? Reading through your original post again makes me realize that it's graphics functions you're aiming at. I fear you won't be able to produce graphical

Stripping windows CR/LF characters

2002-01-25 Thread IT Workflow - Terry Honeyford
I am reading a line at a time of a windows log file and want to strip off the CR or LF characters at the end of the line chomp seems to have a weird effect (returning the cursor to the beginning of the line!) I am sure there is a regex to do this (similar to s/\cM//g for MAC line endings) but I

Date Manipulation

2002-01-25 Thread Lysander
I was wondering if there is an easy way to convert between date formats in PERL. Specifically I need to rewrite 22-January-2002 as 2002-01-22 prior to inserting into a date field in MySQL. In PHP (which is what I usually code in) I would just do something like $date =

RE: Stripping windows CR/LF characters

2002-01-25 Thread Hanson, Robert
This should work... s/\n\r?$/gm MS line endings are ASCII 10, 13. Rob -Original Message- From: IT Workflow - Terry Honeyford [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 11:27 AM To: [EMAIL PROTECTED] Subject: Stripping windows CR/LF characters I am reading a line at a

Re: Stripping windows CR/LF characters

2002-01-25 Thread Brett W. McCoy
On Fri, 25 Jan 2002, IT Workflow - Terry Honeyford wrote: I am reading a line at a time of a windows log file and want to strip off the CR or LF characters at the end of the line chomp seems to have a weird effect (returning the cursor to the beginning of the line!) I am sure there is a

RE: Size of directory

2002-01-25 Thread Johnson, Shaunn
--howdy: --maybe i'm not following this, but, are you saying 'du -sk /directory' doesn't do what you want? --grant it, this is a perl mail list, but does things really have to be that complicated? -X I don't reach understand how I could obtain the size of a given directory and all the

RE: Stripping windows CR/LF characters

2002-01-25 Thread Timothy Johnson
I'm not sure what you mean about chomp's weird effect, but the newline character in windows is still \n. In Windows that stands for a Carriage Return and then a Line Feed. -Original Message- From: IT Workflow - Terry Honeyford To: [EMAIL PROTECTED] Sent: 1/25/02 8:27 AM Subject:

RE: Date Manipulation

2002-01-25 Thread Hanson, Robert
Use Date::Parse and Date::Format, it works much the same way. It is part of the TimeDate package on CPAN. use Date::Parse; use Date::Format; $date = time2str(%Y-%m-%d, str2time(22-January-2002))' Rob -Original Message- From: Lysander [mailto:[EMAIL PROTECTED]] Sent: Friday, January

RE: Stripping windows CR/LF characters

2002-01-25 Thread IT Workflow - Terry Honeyford
I am trying to print out only the lines that begin with Either Unable to attach to, OR Backup of and append to the line NOT OK or OK depending on which match I get Here is the offending bit of script... open (FILE, /path/to/file)or die can't open file $!; while (FILE){ chomp; if (m/^Unable to

RE: simple perl question

2002-01-25 Thread Deen Hameed
Nope... the . loses its metaness when inside the character class... where the regexp *does* stuff up is that it allows more than one decimal point in the string... deen yayy I know something! hameed On Fri, 25 Jan 2002, John Edwards wrote: Oh. One more thing. Your regex should have the .

How do I check to see if a drive (i.e. C: or D:) exists??

2002-01-25 Thread Ryan Guy
How do I check to see if a drive (i.e. C: or D:) exists?? I am writing a script to couple start menu files to the all users directory of different windows configurations and I need to know this to edit the shortcuts on some machines (forget about why). Any help would be greatly appreciated. --

clearing the screen...

2002-01-25 Thread ABhagwandin
I know that in Bourne Shell programming, you can use a command such as 'tput clear' to clear the screen for you. Is there something similar in Perl? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: clearing the screen...

2002-01-25 Thread Jaimee Spencer
Hello ABhagwandin, You could use system(clear) inside of your perl script. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: clearing the screen... I know that in Bourne Shell

RE: How do I check to see if a drive (i.e. C: or D:) exists??

2002-01-25 Thread Gary Hawkins
#!perl @driveletters = (C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z); for (@driveletters) { s#$#:\\#; print $_\n if ! -e; print $_ found\n if -e; } If you need to do different things based on different versions of Windows, one way to find the particular version is

RE: clearing the screen...

2002-01-25 Thread Rob Genovesi
I typically use something like: $clear = `clear`; print $clear; Make sure the clear command is in your path ('which clear' from the shell will tell you if/where it is). Saving the results of the clear command to a variable saves you from having to make a system call every time you want to

RE: clearing the screen...

2002-01-25 Thread Jaimee Spencer
Thanks Rob, Your way makes more sense to use. -Original Message- From: Rob Genovesi [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 10:48 AM To: [EMAIL PROTECTED] Subject: RE: clearing the screen... I typically use something like: $clear = `clear`; print $clear; Make

Re: How do I check to see if a drive (i.e. C: or D:) exists??

2002-01-25 Thread Jonathan E. Paton
How do I check to see if a drive (i.e. C: or D:) exists?? I am writing a script to couple start menu files to the all users directory of different windows configurations and I need to know this to edit the shortcuts on some machines (forget about why). Any help would be greatly

Re: How do I check to see if a drive (i.e. C: or D:) exists??

2002-01-25 Thread Jenda Krynicky
From: Ryan Guy [EMAIL PROTECTED] How do I check to see if a drive (i.e. C: or D:) exists?? I am writing a script to couple start menu files to the all users directory of different windows configurations and I need to know this to edit the shortcuts on some machines

Re: How do I check to see if a drive (i.e. C: or D:) exists??

2002-01-25 Thread Jonathan E. Paton
If you don't mind you'll miss CDs you can use -e : print C: exists\n if -e 'c:\\'; ... If you do mind try : use Win32::FileOp qw(Substed); print C: exists\n if Substed 'c:'; ... and if you want to get all drives use @drives = sort keys

Why cant perl resolve this address?

2002-01-25 Thread Ryan Guy
I am trying to copy files into users start menus because of an installation gone awry. The files goto different places depending on the os. networked computers are referred to as: \\(computername)\(driveletter)$ john doe's machine name: \\doej\c$(for the c drive) \\doej\d$(for the d

Text::CSV problem

2002-01-25 Thread Jason Purdy
I have this CSV file given to me to grab fields and compare/update against a db following some rules. I'm having problems parsing the CSV file, though, b/c of some certain characters. I don't know what the characters are (newlines, \r's, etc [or some combination of the above]) and I tried

Re: Why cant perl resolve this address?

2002-01-25 Thread Brent Michalski
AAARGH, MY EYES;o) Use a forward slash! It should work no problem in Win. system(copy \C:\\Documents and Settings\\ryang\\Start Menu\\Programs\\Yardi 4.3\\*.*\ \$comp\\c\$\\winnt\\profiles\\all users\\start menu\\programs\\Yardi 4.3\\\) || print Failed! next; Would

RE: Text::CSV problem

2002-01-25 Thread ABhagwandin
you can use the Unix command `od -c filename`, which will give you an octal dump in character mode of the file. This will tell you what characters are where in the file. -Original Message- From: Jason Purdy [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 2:25 PM To: [EMAIL

Using perl with procmail

2002-01-25 Thread Dennis G. Wicks
Greetings; I am getting a lot of email with munged dates in it and I would like to fix them by grabbing them with procmail and passing them to a perl program to update the Date: string. First, is this possible? Can I pass an email to perl and then update it in the mail spool? If I can't, then I

RE: Text::CSV problem

2002-01-25 Thread ABhagwandin
I didn't look it up in a table, but it should be a vertical tab. This explains why the printed output has so much space (in you original email) between `OTHER` and the closing ``. I am guessing that something like s/\cV// or s/\cv// should do the trick. -Original Message- From: Jason

RE: How do I check to see if a drive (i.e. C: or D:) exists??

2002-01-25 Thread Timothy Johnson
You can always use the Win32::Lanman module and include a line like this: Win32::Lanman::NetServerDiskEnum($client,\@drives); to check across the network. -Original Message- From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 11:09 AM To: [EMAIL

Re: Text::CSV problem

2002-01-25 Thread Jason Purdy
I thought that woulda done it too (didn't try the \cV, but still the same result - not working :(). I've expanded the s///'s: foreach ( @lines ) { s/\cV//gs; s/\cv//gs; s/\\v//gs; # just for giggles ;) Any other ideas? Thanks! Jason If memory serves me right, on

Re: Text::CSV problem

2002-01-25 Thread Jason Purdy
Nevermind ... found it on google: s/\013//gs; Thanks for the tip on od vertical tab Now I got other characters to chase down! ;) Jason lovin' CSV right now ;) Purdy If memory serves me right, on Friday 25 January 2002 15:01, Jason Purdy wrote: I thought that woulda done it too (didn't try

Re: Why cant perl resolve this address?

2002-01-25 Thread Jeff 'japhy' Pinyan
On Jan 25, Brent Michalski said: system(qq{copy C:/Documents and Settings/ryang/Start Menu/Programs/Yardi 4.3/*.* //$comp/c\$/winnt/profiles/all users/start menu/programs/Yardi 4.3/}) || print Failed! next; The only typo I can see is the || should be an , due to the nature of system().

RE: Text::CSV problem

2002-01-25 Thread ABhagwandin
That reminds me, if you had done `od filename`, it would have output the file in octal, which would have given you what you wanted. ;-) -Original Message- From: Jason Purdy [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 3:03 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject:

unknown errors

2002-01-25 Thread yun yun
why I always get the error messages like: bad screen distance fill at D:/Perl/site/lib/Tk.pm line 228. when I use $id = $canvas-create ('line', 10, 10, 100, 100, fill = 'red' ); ? Isn't it right?

RE: clearing the screen...

2002-01-25 Thread Jonathan E. Paton
I typically use something like: $clear = `clear`; print $clear; Make sure the clear command is in your path ('which clear' from the shell will tell you if/where it is). The Cookbook suggests using the Term::Cap module, but isn't worth it unless you care about calling an external

Re: unknown errors

2002-01-25 Thread Jonathan E. Paton
why I always get the error messages like: bad screen distance fill at D:/Perl/site/lib/Tk.pm line 228. when I use $id = $canvas-create ('line', 10, 10, 100, 100, fill = 'red' ); ? Isn't it right? No, not according to

RE: Stripping windows CR/LF characters

2002-01-25 Thread Brett W. McCoy
On Fri, 25 Jan 2002, IT Workflow - Terry Honeyford wrote: I am trying to print out only the lines that begin with Either Unable to attach to, OR Backup of and append to the line NOT OK or OK depending on which match I get Here is the offending bit of script... open (FILE, /path/to/file)or

Re: Stripping windows CR/LF characters

2002-01-25 Thread Johnathan Kupferer
Brett W. McCoy wrote: On Fri, 25 Jan 2002, IT Workflow - Terry Honeyford wrote: I am trying to print out only the lines that begin with Either Unable to attach to, OR Backup of and append to the line NOT OK or OK depending on which match I get Here is the offending bit of script... open (FILE,

unknown error

2002-01-25 Thread mb
Hi, I had correctly created a system DSN (OS windows 98), this DSN does not require usr and so password, if (!($db = new Win32::ODBC(Gestion100))){ print Error connecting to $DSN\n; print Error: . Win32::ODBC::Error() . \n; exit; } I'm perplexed about the error signposted :

resizable shape in a canvas

2002-01-25 Thread yun yun
how can I make a shape (eg: a line, or an oval) in a canvas resizable when I shrink or enlarge the whole canvas? _ Do You Yahoo!? µÇ¼Ãâ·ÑÑÅ»¢µçÓÊ! http://mail.yahoo.com.cn font color=#FFÎÞÁÄ£¿ÓôÃÆ£¿¸ßÐË£¿Ã»ÀíÓÉ£¿¶¼À´ÁÄÌì°É£¡/font¡ª¡ª

RE: Grant a right to User in NT

2002-01-25 Thread rothd
I am attaching a script from my second book (http://www.roth.net/books/handbook/) set privileges, remove them, enumerate them for a user, enumerate users with a priv and if you pass in -p then it will display all of the available privileges. dave -Original Message- From:

[Fwd: ezmlm response]

2002-01-25 Thread perl
Hi ,,, this my first time i write to you :) i have the uncluder script $file = $ENV{'QUERY_STRING'}; print Content-type: text/html\n\n; if($file eq ) { print document.writeln(' Includer Error: No File Specified. ');\n; print document.writeln('Script by SmartCGIs.com