Re: Help with unpack function - C struct to Perl

2005-12-01 Thread John W. Krahn
James Turnbull wrote: > Hi Hello, > I have a C data structure being outputted to a Unix socket that I need > to convert into a form Perl can use. I am using IO::Socket to connect > to the socket and I can receive the data fine. > > I am using the Perl unpack function to convert the data. I've

Re: Reading xls file

2005-12-01 Thread Colm Gallagher
For a slightly different approach (output only) I create an XML file with the data I want and then XSLT transform to an excel sheet here is a short script I wrote to convert an excel-html file to an xslt http://www14.brinkster.com/colm/perl/perl-excel-xsl.html This approach has the benefit that

config files

2005-12-01 Thread M. Lewis
I'm trying to move the configuration variables out of three perl scripts and put them in a config file. Fine, no problem so far. The way this works is an email message with a given subject is processed by procmail then passed off to the first perl script. The first script sets up the second. T

Help with unpack function - C struct to Perl

2005-12-01 Thread James Turnbull
Hi I have a C data structure being outputted to a Unix socket that I need to convert into a form Perl can use. I am using IO::Socket to connect to the socket and I can receive the data fine. I am using the Perl unpack function to convert the data. I've read the documentation and all the ex

RE: Moving Folder Access denied

2005-12-01 Thread Pant, Hridyesh
Why are you sending same mail to individual, while you are able to send mail to the beginners@perl.org Regards Hridyesh -Original Message- From: Manoj Thakkar, Noida [mailto:[EMAIL PROTECTED] Sent: 01 December 2005 20:42 To: beginners@perl.org Subject: FW: Moving Folder Access denied

Re: Interpolating variables in a string from a file

2005-12-01 Thread Andrew Brosnan
On 12/1/05 at 9:07 PM, [EMAIL PROTECTED] (Jeff 'japhy' Pinyan) wrote: > On Dec 1, Andrew Brosnan said: > > > my $var = 'world'; > > my $data = ; > > > > __DATA__ > > hello $var > > Read 'perldoc -q expand'. $data =~ s/(\$\w+)/$1/eeg; Interesting, matching and substituting interpolates, so by s

RE: Interpolating variables in a string from a file

2005-12-01 Thread Andrew Brosnan
Ahh, but you changed the data in the file...that's against the rules. i.e. I don't have that luxury :-) On 12/1/05 at 6:07 PM, [EMAIL PROTECTED] (Timothy Johnson) wrote: > > You were probably pretty close when you tried, but don't forget that > when you eval a string, eval will take it literall

RE: Interpolating variables in a string from a file

2005-12-01 Thread Timothy Johnson
You were probably pretty close when you tried, but don't forget that when you eval a string, eval will take it literally, so you need to put double-quotes around it in order for it to be interpolated. ### use warnings; use strict; my $var = 'world'; undef $/; my $d

Re: Interpolating variables in a string from a file

2005-12-01 Thread Jeff 'japhy' Pinyan
On Dec 1, Andrew Brosnan said: my $var = 'world'; my $data = ; __DATA__ hello $var Read 'perldoc -q expand'. -- Jeff "japhy" Pinyan% How can we ever be the sold short or RPI Acacia Brother #734% the cheated, we who for every service http://www.perlmonks.org/ % have long ago b

RE: Interpolating variables in a string from a file

2005-12-01 Thread Andrew Brosnan
On 12/1/05 at 5:10 PM, [EMAIL PROTECTED] (Timothy Johnson) wrote: > perldoc -f eval Yes, I've read that. I can't seem to make it work though. Perhaps you could show me since you know how :-) > -Original Message- > From: Andrew Brosnan [mailto:[EMAIL PROTECTED] > Sent: Thursday, Decembe

RE: Interpolating variables in a string from a file

2005-12-01 Thread Timothy Johnson
perldoc -f eval -Original Message- From: Andrew Brosnan [mailto:[EMAIL PROTECTED] Sent: Thursday, December 01, 2005 5:06 PM To: beginners@perl.org Subject: Interpolating variables in a string from a file How can I make this do what I mean? #!/usr/bin/perl use warnings; use strict; my

Interpolating variables in a string from a file

2005-12-01 Thread Andrew Brosnan
How can I make this do what I mean? #!/usr/bin/perl use warnings; use strict; my $var = 'world'; undef $/; my $data = ; print $data; #oops __DATA__ hello $var -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Reading xls file

2005-12-01 Thread Alfred Vahau
http://www-128.ibm.com/developerworks/library/l-pexcel/ Alfred, Timothy Johnson wrote: If you are on a Windows system, the Win32::OLE module will work beautifully for this. As a matter of fact, the documentation for the Win32::OLE module uses Excel as an example. -Original Message-

RE: Reading xls file

2005-12-01 Thread Timothy Johnson
If you are on a Windows system, the Win32::OLE module will work beautifully for this. As a matter of fact, the documentation for the Win32::OLE module uses Excel as an example. -Original Message- From: Pant, Hridyesh [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 30, 2005 8:22 PM

Re: Count number of times matched

2005-12-01 Thread Dr.Ruud
SG Edwards: > I want to count the number of times that a match occurs perldoc -q count -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

FW: Moving Folder Access denied

2005-12-01 Thread Manoj Thakkar, Noida
Hi Chris, Need a favor, Can you please forward the message below to perl mailing list. As i dont have access to outside mails here in office so I subscribed mailing list to my gmail account and have put an auto forward there to my office email account to access it. But i can not send mails to

Re: Reading xls file

2005-12-01 Thread Chris Devers
On Thu, 1 Dec 2005, Rob Coops wrote: > Then again Chris here is asking for a way to read XLS files not a way > to write them... Doh! Of course, I meant Spreadsheet::ParseExcel :-) -- Chris Devers xô©l71Æþ; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

Re: Count number of times matched

2005-12-01 Thread Xavier Noria
On Dec 1, 2005, at 15:13, SG Edwards wrote: Hi folks, If I want to count the number of times that a match occurs in a line is there a way of doing this, if there is I have not found it! e.g. $line="This is a sentence about matching sentences.\n"; $line=~/sentence/ig; If you just want to

Re: Count number of times matched

2005-12-01 Thread Jeff 'japhy' Pinyan
On Dec 1, SG Edwards said: If I want to count the number of times that a match occurs in a line is there a way of doing this, if there is I have not found it! $line="This is a sentence about matching sentences.\n"; $line=~/sentence/ig; So I will have matched "sentence" twice and I want to re

Urgent: Searching for a Config file parser

2005-12-01 Thread Madhur Kashyap
Hi, I know there are tonnes of config file parser listed at CPAN but I am looking for something different. Also, after searching for a long time, I could not find one which suits my needs. I am looking for a config file parser to which I can specify 1.) variables whose values are required to be p

Re: Count number of times matched

2005-12-01 Thread Shawn Corey
SG Edwards wrote: If I want to count the number of times that a match occurs in a line is there a way of doing this, if there is I have not found it! e.g. $line="This is a sentence about matching sentences.\n"; $line=~/sentence/ig; So I will have matched "sentence" twice and I want to record

Count number of times matched

2005-12-01 Thread SG Edwards
Hi folks, If I want to count the number of times that a match occurs in a line is there a way of doing this, if there is I have not found it! e.g. $line="This is a sentence about matching sentences.\n"; $line=~/sentence/ig; So I will have matched "sentence" twice and I want to record this.

Re: PHP help to execute to .pl

2005-12-01 Thread JupiterHost.Net
Brent Clark wrote: Hi all Howdy, Sorry for posting this here No need to be sorry just post PHP questions to a PHP list. > (no to anger anyone, could you please reply back off line) I am in need of simulating the post like a web client The html would look like this: GREENc This is

Re: Useless use of lc

2005-12-01 Thread Beast
Xavier Noria wrote: On Dec 1, 2005, at 12:48, Beast wrote: How do I avoid this kind of warning? Useless use of lc in void context at ./myscript.pl line 87. Tried to use : lc $string if $string; but still gives warning. I can count with my fingers the times a warning was not triggered b

Re: Useless use of lc

2005-12-01 Thread Xavier Noria
On Dec 1, 2005, at 12:48, Beast wrote: How do I avoid this kind of warning? Useless use of lc in void context at ./myscript.pl line 87. Tried to use : lc $string if $string; but still gives warning. I can count with my fingers the times a warning was not triggered by something that was

Useless use of lc

2005-12-01 Thread Beast
How do I avoid this kind of warning? Useless use of lc in void context at ./myscript.pl line 87. Tried to use : lc $string if $string; but still gives warning. -- --beast -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

PHP help to execute to .pl

2005-12-01 Thread Brent Clark
Hi all Sorry for posting this here (no to anger anyone, could you please reply back off line) I am in need of simulating the post like a web client The html would look like this: GREENc This is what I have so far: \n"; } else { $out = "POST /$path HTTP/1.1\r\n"; $out .= "Host: $hos

Moving Folder Access denied

2005-12-01 Thread Manoj Thakkar, Noida
Hi, I am trying to move some file form one folder to other . I am able to move the file if i do it from the dos prompt but it gives me access denied when i try it using Perl. It seem to me a problem in reading the variable value. Her is my code Please suggest .. use Win32API::File qw (

Moving Folder Access denied

2005-12-01 Thread Pant, Hridyesh
Hi, I am trying to move some file form one folder to other . I am able to move the file if i do it from the dos prompt but it gives me access denied when i try it using Perl. It seem to me a problem in reading the variable value. Her is my code Please suggest .. use Win32API::File qw ( :A

Re: Validating Decimal Values

2005-12-01 Thread John W. Krahn
Joel Divekar wrote: > Hi Hello, > I am having a small program which parses data file. > The data file contains decimal values and I am not > able to validate the decimal number. > > For eg. the decimal number will be as follows > > Max Size : 9.99 > valid values : 3.00 or 745.15 or 21576.00

Re: Reading xls file

2005-12-01 Thread Rob Coops
Then again Chris here is asking for a way to read XLS files not a way to write them... So maybe the: *DBD::Excel*would be more helpful in this case, but you are right most of us are not in the habit of writting other people's homework