perl.org wrote:
On Thu, 29 Jul 2004 12:08:20 -0400 (EDT), Jeff 'japhy' Pinyan wrote
That's why he broke it down. Is the map() really the problem, or is
it the regex, the ?: operator, and the two array references?
All of the above ;), but now that I think about it the map looks easiest, then
> ?:
Hi everyone,
I am very new to Perl. I need two perl scripts, one would run on a
client, the
other would run on a server.
The perl script on the client machine runs an application. The
application
creates a file called "request.xml" The perl script reads the file,
and sends
it to the server.
On 7/29/2004 4:27 PM, NandKishore.Sagi wrote:
... a number of messages to a public mailing list with a receipt
notification request.
Please, don't do that.
Features such as receipt notification, message priorities, auto
responders are not appropriate for mailing lists.
Thank you,
Randy.
--
To u
I've created a module that uses HTML::Parser to parse some HTML and create a
tree structure. Someone had suggested to use HTML::TreeBuilder, but my HTML
contains HTML::Mason code embedded, and HTML::TreeBuilder doesn't handle that
well at all. HTML::TreeBuilder also adds , , and tags when
ther
Never mind guys.
I figured it out.
The row and col value were not set and as a result I got a screenful
:D
Thanks for any time you spent on this issue.
Nand Kishore
-Original Message-
From: NandKishore.Sagi [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 3:33 PM
To: [EMAI
I guess the script was not recieved by you guys. Here is the script I
have written.
#! /opt/3d/bin/perl -w
use strict ;
use warnings ;
use Spreadsheet::WriteExcel;
my $workbook ;
my $worksheet ;
my $format ;
my $row ;
my $col ;
my $host ;
$workbook = Spreadsheet::WriteExcel->new("dclist.xls
Title: Message
Hi All
,
I am in process of generating some statistics for different unix boxes. I would
like to generate excel workbook with a single worksheet for each box. I had
written a test script to create the excel sheet. I was able to create the excel
sheet but
perl.org <[EMAIL PROTECTED]> wrote:
: Thanks for the detailed response. I know the interspersed
: comments won't make some members of the list happy, but
: they're just opinions.
:
: James Edward Gray II wrote:
: : Not a "fan" of map() and grep() or just don't understand them?
:
: Both, didn't
But trinaries are so much more elegant than if/else statements.
Mark
-Original Message-
From: James Edward Gray II [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 12:33 PM
To: perl.org
Cc: Perl Beginners
Subject: Re: sort by extension
On Jul 29, 2004, at 11:23 AM, perl.org wrote
On Jul 29, 2004, at 11:23 AM, perl.org wrote:
On Thu, 29 Jul 2004 12:08:20 -0400 (EDT), Jeff 'japhy' Pinyan wrote
That's why he broke it down. Is the map() really the problem, or is
it the regex, the ?: operator, and the two array references?
All of the above ;), but now that I think about it the
On Jul 29, 2004, at 10:42 AM, perl.org wrote:
Thanks for the detailed response.
Anytime.
It's easier to read that code bottom to top, so let's start with:
map { m/\.([^.]+)$/ ? [$_, $1] : [$_, ''] } @input;
Unfortunately I really don't find this easy to read.
That's unfortunate, because I actually
On Thu, 29 Jul 2004 12:08:20 -0400 (EDT), Jeff 'japhy' Pinyan wrote
>
> That's why he broke it down. Is the map() really the problem, or is
> it the regex, the ?: operator, and the two array references?
All of the above ;), but now that I think about it the map looks easiest, then
?: (which I a
On Jul 29, [EMAIL PROTECTED] said:
>>You are opening a file for appending and reading. But you forgot (or
>>didn't know) that you start out at the *end* of the file.
I didn't thanks for the tip
>open (DONE,"+>>$done") or die "Cannot open file: $!";
>
>flock (DONE, 1);
>>You should real
On Jul 29, perl.org said:
>> It's
>> easier to read that code bottom to top, so let's start with:
>>
>> map { m/\.([^.]+)$/ ? [$_, $1] : [$_, ''] } @input;
>
>Unfortunately I really don't find this easy to read.
That's why he broke it down. Is the map() really the problem, or is it
the regex, th
Thanks.
Didn't know about PERL5LIB but when it looked it up in the Cookbook its the perfect &
easy solution.
I just put
export PERL5LIB=$RGSE/lib
into my .bashrc file and now there is no longer a need to use:
perl -I${RGSE}/lib myprogram.pl
to run the program. I can just do:
Thanks for the detailed response. I know the interspersed comments won't make
some members of the list happy, but they're just opinions.
On Wed, 28 Jul 2004 13:46:07 -0500, James Edward Gray II wrote
>
> Not a "fan" of map() and grep() or just don't understand them?
Both, didn't understand them
On Wed, 2004-07-28 at 22:14, PerlDiscuss - Perl Newsgroups and mailing
lists wrote:
> I want to add some paths to the @INC array to resolve certain package
> names at runtime.
>
> One of the methods is: "push(@INC,$path) or unshift($path,@INC)" and then
> say "require package_name;".
> the problem
> I'm trying to add my own module "DEGS::ldegs" to a Perl program.
> However, this module will part of a distribution called "RGSE",
> which could be installed on a different path on different peoples PCs.
> However, it will always be in the directory "$ENV{RGSE}/lib".
>
> The problem is when I ru
Thompson, Glenn wrote:
> I'm trying to add my own module "DEGS::ldegs" to a Perl program.
> However, this module will part of a distribution called "RGSE",
> which could be installed on a different path on different peoples PCs.
> However, it will always be in the directory "$ENV{RGSE}/lib".
>
> T
You may wish to look at "BEGIN" ...
Hope that gives you some ideas...
Thanks,
jwm
-Original Message-
From: Thompson, Glenn [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 10:54 AM
To: [EMAIL PROTECTED]
Subject: use lib - not known at compile time
I'm trying to add my own modu
I'm trying to add my own module "DEGS::ldegs" to a Perl program.
However, this module will part of a distribution called "RGSE",
which could be installed on a different path on different peoples PCs.
However, it will always be in the directory "$ENV{RGSE}/lib".
The problem is when I run the progra
On Jul 29, 2004, at 9:23 AM, BOLCATO CHRIS (esm1cmb) wrote:
This may be a dumb question, but why will this loop not end when
nothing is
entered in STDIN?
STDIN is a stream. A blank line does not constitute the end of a
stream. I believe your can signal an end to the stream in most
terminals wi
BOLCATO CHRIS (esm1cmb) wrote:
> This may be a dumb question, but why will this loop not end when
> nothing is entered in STDIN?
>
> print "Enter Things:\n";
> while () {
> print "I saw $_";
> }
> print "The End\n";
By "nothing is entered", I assume you mea
Prasanna kothari wrote:
>try this
> "use lib ";
Randy W. Sims wrote:
>push( @INC, $path );
>require package_name;
>package_name->import(); # pulls in exported symbols
Well these are real sweet ways, I agree. No BEGIN blocks required
and no hassles.
But is there any way to avoid this Expor
This may be a dumb question, but why will this loop not end when nothing is
entered in STDIN?
print "Enter Things:\n";
while () {
print "I saw $_";
}
print "The End\n";
If nothing is entered the loop continues.
Output:
I saw red
I sa
On Jul 29, 2004, at 7:52 AM, Francesco del Vecchio wrote:
Hi guys,
Hello.
I have a problem with a Regular expression.
I have to delete from a text all HTML tags but not the DIV one
(keeping all the parameters in the tag).
This is a complex problem. Your solution is pretty naive and will only
wor
From: Francesco del Vecchio <[EMAIL PROTECTED]>
> I have a problem with a Regular expression.
> I have to delete from a text all HTML tags but not the DIV one
> (keeping all the parameters in the tag).
Don't do that!
You should use a HTML parser module instead of regexps. Parsing HTML
is not as
On Jul 29, arichmond(contr-ird) said:
>I have a file I am trying to read and write to, it's obviously opening
>it ie.. No errors but not writing to it.
>
> Since no errors are being produced I can't figure out why?
You are opening a file for appending and reading. But you forgot (or
didn't know)
On Jul 28, perl.org said:
>On Wed, 28 Jul 2004 14:04:26 -0400 (EDT), Jeff 'japhy' Pinyan wrote
>> On Jul 28, perl.org said:
>>
>> I would use File::Basename so that I can be sure it works on all
>> platforms. What is your take on files with multiple extensions, like
>> program.pl.bak or jeff.piny
Hi guys,
I have a problem with a Regular expression.
I have to delete from a text all HTML tags but not the DIV one (keeping all the
parameters in the
tag).
I've done this:
^^
#!/usr/bin/perl
use strict;
my $test=<
=SU
[EMAIL PROTECTED] wrote:
> I want to add some paths to the @INC array to resolve certain package
> names at runtime.
>
> One of the methods is: "push(@INC,$path) or unshift($path,@INC)" and
> then say "require package_name;".
> the problem with this is that we still need to use the "::" operator
>
I have a file I am trying to read and write to, it’s
obviously opening it ie.. No errors but not writing to it.
Since no errors are being produced I can’t figure out
why?
In short I am reading the file to see if I previously sent an
email concerning a “name” and if I have then don’t sen
[EMAIL PROTECTED] wrote:
This is one way of doing it. Probably there could be some other short
and sweet ways of doing it. I'm also waiting for such an answer.
push( @INC, $path );
require package_name;
package_name->import(); # pulls in exported symbols
-Original Message-
From: PerlDiscus
try this
"use lib ";
PerlDiscuss - Perl Newsgroups and mailing lists wrote:
I want to add some paths to the @INC array to resolve certain package
names at runtime.
One of the methods is: "push(@INC,$path) or unshift($path,@INC)" and then
say "require package_name;".
the problem with this is that we
Hi shahj,
Instead of "require package_name" you may say use package_name.
As 'require' is not bringing in the symbols. Only 'use' does it.
You should always use 'use' when you wanted to bring in the symbols
inside your script from the package.
More importantly the package 'package_name' should
I want to add some paths to the @INC array to resolve certain package
names at runtime.
One of the methods is: "push(@INC,$path) or unshift($path,@INC)" and then
say "require package_name;".
the problem with this is that we still need to use the "::" operator with
the symbols to resolve the packag
Alok Bhatt wrote:
Hi All,
Can someone please tell me how do we keep track of a
variable. ie Whenever a particular variable is
accessed (printed, incremented etc.), a counter
should increase, so that we can know how many times it
has been accesssed.
The mechanism is tie, see `perldoc tie`
Here
Hi All,
Can someone please tell me how do we keep track of a
variable. ie Whenever a particular variable is
accessed (printed, incremented etc.), a counter
should increase, so that we can know how many times it
has been accesssed.
Thanks in Advance,
Regards,
Alok
38 matches
Mail list logo