Hi,
Is there any way in which I can tell perl where to print my data. i.e.
Here is my .html
That doesn't look like HTML to me? I am thoroughly confused, can you
provide better information about the issue?
As a hunch you might want to check out one of the various template kits,
Is there some kind of a swtich statement in perl?
--
Kind Regards,
Werner Otto
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
On 13 May 2004, at 10:29, Werner Otto wrote:
Is there some kind of a swtich statement in perl?
Yes and no. See:
perldoc -q switch
--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hi All,
Is there any way in perl i can search for the running
application and its process id using perl. e.g. Let us suppose I know
the name of the application as httpdbinary Can i search in processes
whether that application is running and what is its process id My
problem is even if
On May 13, Lee Johnson said:
#
# End date is a year after start date
#
$edate = $sdate;
$edate =~ s/\///g;
$edate++;
$edate =~ s/.*(\d{4})$/01\/04\/$1/;
Are you sure you want to just use April 1st (or January 4th) always? You
don't want to use the day and month in $sdate?
where $sdate is a UK
How can I get var1 and var2 in one step using s/// type method?
(Not using split)
cat test.pl
#!/usr/local/bin/perl -w
$incoming = shift;
## Where incoming looks like '-A -a'
($var1 = $incoming) =~ s/(^ *\-)([A-Z])( *\-)([a-z])/$2/;
($var2 = $incoming) =~ s/(^ *\-)([A-Z])( *\-)([a-z])/$4/;
Hi,
I am trying to build a perl program that reads through a very large text
file, searches for a pattern, and prints the pattern - within its context -
into a log file for later study. The context is defined as, say, 20
characters before and after the found pattern. I intend to use this for
Two thoughts here:
1) The $. Variable has the line number of the file you are iterating
through, so you could use that combined with pos()
2) You could also try something like this:
while(INFILE){
if($_ =~ /.{20}$pattern.{20}/){
push(@found,$1);
}
}
-Original Message-
Hi !!
Pls tell me what are the tied variables in perl. I have tried it to read it
from book but some words from the experts will be quite useful to make
further progress and clarity in understanding those in general terms.
Thanks in advance,
Regards,
Anish
Hello José,
Unfortunatel
-Message d'origine-
De : NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]
Envoyé : mardi, 11. mai 2004 16:27
À : BERTHOLD Jean; [EMAIL PROTECTED]
Objet : RE: Problem using File::RsyncP module
-Original Message-
From: BERTHOLD Jean [mailto:[EMAIL PROTECTED]
Hello José,
Unfortunately, these different syntax don't work ...
Perhaps I will ask directly to the module's author to find what is wrong in my code.
Thanks again for your help !
Jean
-Message d'origine-
De : NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]
Envoyé : mardi, 11. mai 2004
On Thu, 2004-05-13 at 14:12, anish mehta wrote:
Hi !!
Pls tell me what are the tied variables in perl. I have tried it to read it
from book but some words from the experts will be quite useful to make
further progress and clarity in understanding those in general terms.
By tying a
Hello,
I need to write a perl script that will run on solaris and the job of this script will
be :
- read a mail from a predefined shared mail box (Outlook/Exchange Server)
- extract the mail attachment (text file)
- parse the content
- create an excel sheet (same content)
Any input is welcome
On Thu, 2004-05-13 at 14:52, NYIMI Jose (BMB) wrote:
Hello,
I need to write a perl script that will run on solaris and the job of this script
will be :
- read a mail from a predefined shared mail box (Outlook/Exchange Server)
- extract the mail attachment (text file)
- parse the content
On Wed, May 12, 2004 at 12:59:44PM -0500, Ben Miller wrote:
my @links = $mech-find_all_links(tag = a, text_regex = qr/\bWORD\b/i );
... tag = a, ...
I suspect.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
[EMAIL PROTECTED] wrote:
my openconf function contains:
sub openconf {
my $pkg = shift;
my $self = bless([EMAIL PROTECTED],$pkg);
open(...
return($self);
}
I have my @config; set at the beggining of the module
you have defined @config as a class variable which
John W. Krahn wrote:
John Doe wrote:
Hello all,
Hello,
i trying to sort one my file that is 10 MB and contain
records:
---
aa
adsad
dasd
das
aa
---
i want to sort and eleminate double records.
I use:
$perl -0777ane '$, = \n; @[EMAIL PROTECTED] = (); print sort keys %uniq' \ out.log
But i
John McKown wrote:
On Sun, 9 May 2004, John Doe wrote:
Hello all,
i trying to sort one my file that is 10 MB and contain
records:
---
aa
adsad
dasd
das
aa
---
i want to sort and eleminate double records.
I use:
$perl -0777ane '$, = \n; @[EMAIL PROTECTED] = (); print sort keys %uniq' \ out.log
Andrew Gaffney wrote:
In a program I'm working on, I build a hash tree of sorts that contains
package dependencies. Each key contains an array with the first level
dependencies of the key. Each one of those dependencies have their own key with
their first level dependencies in the hash. For
Jeff 'Japhy' Pinyan wrote:
my %tree = { package1 = [ package2, package3, package4 ],
package2 = [ package7 ],
package3 = [ package5 ],
package4 = [ package7, package6],
package5 = [ ],
package6 = [ ],
I have a problem that I thought would be perfect for Perl, except that I
seem to be using all my system resources to run it. Of course this
probably means I'm doing it the wrong way...
The problem:
We have a backup server that is missing records from the production
server for a particular
I think there will be some optimizations always possible, but You wont
get any dramatic improvements.
What I would do is something like this
First make sure that all the data is sorted in the file
Create a sequence array of all the required numbers, In your example it
was all numbers from 1..10
On May 12, Rob Dixon said:
Now, I want to walk the tree starting with a known package1 and build an
ordered list of packages to install. For example:
But in the general caase there's a problem with finding the root of the
tree. Indeed there may be several independent trees or none at all if
On May 13, anish mehta said:
Pls tell me what are the tied variables in perl. I have tried it to read it
from book but some words from the experts will be quite useful to make
further progress and clarity in understanding those in general terms.
A tied variable can be explained in two ways; I
Hi All,
Is there any way in perl i can search for the running application and its
process id using perl. e.g. Let us suppose I know the name of the application as
httpdbinary Can i search in processes whether that application is running and what
is its process id My problem is even if
On May 13, Tim Kylie Duke said:
I am trying to build a perl program that reads through a very large text
file, searches for a pattern, and prints the pattern - within its context -
into a log file for later study. The context is defined as, say, 20
characters before and after the found pattern.
- Original Message -
From: Larry Wissink [EMAIL PROTECTED]
Newsgroups: perl.beginners
To: [EMAIL PROTECTED]
Sent: Wednesday, May 12, 2004 6:39 PM
Subject: Finding missing numbers in sequence
I have a problem that I thought would be perfect for Perl, except that I
seem to be using all
On May 12, Larry Wissink said:
We have a backup server that is missing records from the production
server for a particular table. We know that it should have sequential
records and that it is missing some records. We want to get a sense of
the number of records missing. So, we know the problem
JupiterHost.Net wrote:
Hello list,
Perl::Tidy is very excellent for making source look nice.
I was wondering if anyone knew of anything that is the same type of
idea but it optomizes your Perl code to run a bit faster:
for instance:
$newvariable = $howdy;
should be:
Is there a faster and/or cleaner way to do the following:
#
# End date is a year after start date
#
$edate = $sdate;
$edate =~ s/\///g;
$edate++;
$edate =~ s/.*(\d{4})$/01\/04\/$1/;
where $sdate is a UK date of the type dd/mm/
I've tried ($edate = $sdate) =~ s/(.*)(\d)$/$1($2++)/e; to
NYIMI Jose (BMB) wrote:
I need to write a perl script that will run on solaris and the job of
this script will be :
- read a mail from a predefined shared mail box (Outlook/Exchange
Server)
Mail::IMAPClient or Mail::POP3Client
- extract the mail attachment (text file)
- parse the
NYIMI Jose (BMB) wrote:
I need to write a perl script that will run on solaris and the job of
this script will be :
- read a mail from a predefined shared mail box (Outlook/Exchange
Server)
Mail::IMAPClient or Mail::POP3Client
- extract the mail attachment (text file)
-
* JupiterHost.Net [EMAIL PROTECTED] [2004-05-13T11:35:58]
Bob Showalter wrote:
for instance:
$newvariable = $howdy;
should be:
$newvariable = $howdy;
That's not an appropriate optimization. Perl objects can overload
stringification.
Interesting...
So when would that cause
-Message d'origine-
De : Wiggins d Anconia [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 13 mai 2004 18:02
À : NYIMI Jose (BMB); [EMAIL PROTECTED]
Objet : RE: Extracting attachment from mail
-Original Message-
From: NYIMI Jose (BMB)
Sent: Thursday, May 13, 2004 11:23
Ricardo SIGNES wrote:
* JupiterHost.Net [EMAIL PROTECTED] [2004-05-13T11:35:58]
Bob Showalter wrote:
for instance:
$newvariable = $howdy;
should be:
$newvariable = $howdy;
That's not an appropriate optimization. Perl objects can overload
stringification.
Interesting...
So when would that
Jeff 'Japhy' Pinyan wrote:
On May 13, Lee Johnson said:
#
# End date is a year after start date
#
$edate = $sdate;
$edate =~ s/\///g;
$edate++;
$edate =~ s/.*(\d{4})$/01\/04\/$1/;
Are you sure you want to just use April 1st (or January 4th) always? You
don't want to use the day
Group,
Is there a date manipulation module that does the same thing as gnu
`date -d' command? That is, given a spec string, it returns a date in
the past in user selected format.
Like what gnu `date' would do with:
date -d '-2 weeks' +%m%d%Y_%T
04292004_13:20:28
I've written some
On May 13, Harry Putnam said:
Is there a date manipulation module that does the same thing as gnu
`date -d' command? That is, given a spec string, it returns a date in
the past in user selected format.
Like what gnu `date' would do with:
date -d '-2 weeks' +%m%d%Y_%T
04292004_13:20:28
You
Harry Putnam wrote:
How can I get var1 and var2 in one step using s/// type method?
(Not using split)
cat test.pl
#!/usr/local/bin/perl -w
$incoming = shift;
## Where incoming looks like '-A -a'
($var1 = $incoming) =~ s/(^ *\-)([A-Z])( *\-)([a-z])/$2/;
($var2 = $incoming) =~ s/(^
Wiggins d Anconia [EMAIL PROTECTED] writes:
Hi All,
Is there any way in perl i can search for the running
application and its process id using perl. e.g. Let us suppose I know
the name of the application as httpdbinary Can i search in processes
whether that application is running
Harry Putnam wrote:
Group,
Is there a date manipulation module that does the same thing as gnu
`date -d' command? That is, given a spec string, it returns a date in
the past in user selected format.
Like what gnu `date' would do with:
date -d '-2 weeks' +%m%d%Y_%T
Jeff 'japhy' Pinyan [EMAIL PROTECTED] writes:
On May 13, Harry Putnam said:
Is there a date manipulation module that does the same thing as gnu
`date -d' command? That is, given a spec string, it returns a date in
the past in user selected format.
Like what gnu `date' would do with:
date
My setup:
OS= Linux (FedoraCore1 test2)
I see an actual loss of data in reading perldoc output from an xterm
if my term is sized a little small.
I'll show a repeatable example (here anyway):
xterm -geometry 65x20
In that xterm call:
perldoc POSIX
In that page search for past
(/past
Bob Showalter [EMAIL PROTECTED] writes:
Or, you can use something like Date::Manip which handles the '2 weeks ago'
type of expressions. It has its own UnixDate function that is similar to
POSIX::strftime.
Aha... now we're talking. Date::Manip is what I was after:
cat test.pl:
John W. Krahn [EMAIL PROTECTED] writes:
(($var1, $var2) = $incoming) =~ s/(^ *\-)([A-Z])( *\-)([a-z])/$2/;
$incoming =~ s/^( *-)([A-Z])( *-)([a-z])/($var1, $var2)=($2,$4)/e;
Ha.. yup thats right, you can put an expression between those last
two slashes... nice.
--
To unsubscribe, e-mail:
Jeff 'japhy' Pinyan wrote:
The lesson to learn is:
Premature optimization is the root of all evil.
Got ya ;p
http://en.wikipedia.org/wiki/Optimization_(computer_science)
Optimization (computer science
From Wikipedia, the free encyclopedia.
(Wikipedia does not have an article on this
http://en.wikipedia.org/wiki/Optimization_(computer_science)
Optimization (computer science
From Wikipedia, the free encyclopedia.
(Wikipedia does not have an article on this topic yet. To start the
article, click Edit this page.)
?? :( I was wanting to read it...
Looks like
On May 13, Harry Putnam said:
Jeff 'japhy' Pinyan [EMAIL PROTECTED] writes:
On May 13, Harry Putnam said:
Is there a date manipulation module that does the same thing as gnu
`date -d' command? That is, given a spec string, it returns a date in
the past in user selected format.
Like what gnu
Jean-Sébastien Guay wrote:
http://en.wikipedia.org/wiki/Optimization_(computer_science)
Optimization (computer science
From Wikipedia, the free encyclopedia.
(Wikipedia does not have an article on this topic yet. To start the
article, click Edit this page.)
?? :( I was wanting to read
Hello,
This code below works. But I am wondering if it can be made more efficient:
while (FHOREAD) {
my $sport = (split(/\s/,$_))[8];
my $sdport = (split(/\s/,$_))[10];
next if $sport =~ /\D/;
next if $dport =~ /\D/;
if ($sport =~ /^(20|21|22|25|53|80|109|110|123|137|161|443)$/ || $dport
rmck wrote:
Hello,
This code below works. But I am wondering if it can be made more efficient:
while (FHOREAD) {
my $sport = (split(/\s/,$_))[8];
my $sdport = (split(/\s/,$_))[10];
next if $sport =~ /\D/;
next if $dport =~ /\D/;
if ($sport =~
On May 13, rmck said:
while (FHOREAD) {
my $sport = (split(/\s/,$_))[8];
my $sdport = (split(/\s/,$_))[10];
You have $sdport here, but you USE $dport.
next if $sport =~ /\D/;
next if $dport =~ /\D/;
if ($sport =~ /^(20|21|22|25|53|80|109|110|123|137|161|443)$/ || $dport =~
Hi All,
Been ages since I last posted to this list...
Anyhoo, I have a script which handles the uploading of a file.
It uses the CGI module to get the form params etc and open/read/close
statements to receive the file. This is fine and all works well. The
problem is a temporary file (of the
53 matches
Mail list logo