[a-z0-9]+ will match a sequence of characters containing one or more of
the set [a-z0-9].
If you want to match a line of characters that contains NOTHING BUT
[a-z0-9] then you could use:
^[a-z0-9]+$
If you want to match a sequence of characters that must start with [a-z]
and contain any number
I have a module that has a constant.
But I can't seem to get it's value.
Can I export it?
--sample--
use strict;
use Mail::Audit;
exit DEFERRED;
--sample--
DEFERRED is defined in Mail::Audit as 75.
running foo.pl && date
prints the date. It shouldn't.
help?
--
This dungeon is owned and operat
Dear All,
Could anyone tell me how to make a regular expression for match a string only
[a-z0-9] ?
Thanks
I am need to uncompress a CSV file that is compress in a Zip file. I have
been trying for several days to uncompess it with two modules with no luck.
The first module is Compress::Zlib. I had tried using the 'uncompress'
function but it is not working. The other module that I had tried using is
MS Access is using your profile information to make the connection, so that
doesn't necessarily mean that you have direct SMTP access to your server.
Try this: Right-click on Outlook on your desktop and go to Properties. you
should get to a second window with a list of the Email services you are
Harry Putnam <[EMAIL PROTECTED]> wrote:
> I'm wondering how one could arrange to have a vi like editor to use
> during , something like is available in Ksh88 and ksh93, but
> not pdksh.
>
> Where during stdin to program one can have vi like commands available
> for editing the input.
>
> Example
"John W. Krahn" wrote:
>
> Sukrit K Mehra wrote:
> >
> > Hi listers,
>
> Hello,
>
> > While doing this -->
> >
> > @files = readdir(Favorites);
> >
> > i get an unsorted list in @files. What i desire is directories first and
> > then files. Using sort function would sort by ascii value and sort
Shaunn Johnson wrote:
>
> --Howdy:
Hello,
> ## get first of this month as anchor ##
>
> my $day_now=(localtime())[3];
> my $firstday=$day_now - ($day_now-1);
The first day of the month is always 1 so there is no need to calculate
it!
my $firstday = 1;
> my $month_now=(localtime())[4]+1;
> m
Sukrit K Mehra wrote:
>
> Hi listers,
Hello,
> While doing this -->
>
> @files = readdir(Favorites);
>
> i get an unsorted list in @files. What i desire is directories first and
> then files. Using sort function would sort by ascii value and sort
> by_name and such won't work too. Please sugge
Pravesh Biyani wrote:
>
> hi
Hello,
> i have a prog which should create a file according to the date and name
> it "$date.log" and write something depending upon other things in it!
> Here is the code.. which refuses to work
>
> --
>
--- Deb <[EMAIL PROTECTED]> wrote:
> Wow, I don't think I would've figured this out on my own for a long
> while. (Probably why my head is getting a little flat on one side...)
> Using print map { } list; works pretty well. I need to sit down
> with it for a while to understand it it better.
p
Wow, I don't think I would've figured this out on my own for a long while.
(Probably why my head is getting a little flat on one side...)
Using print map { } list; works pretty well. I need to sit down with
it for a while to understand it it better.
Thanks for the nice explanation, Kipp.
deb
--- Deb <[EMAIL PROTECTED]> wrote:
> Hmmm, that's a useful work-around.
>
> I may use it, but I'm really interested in finding out what the correct
> invocaton of "map EXPR, LIST" would be.
>
> Anyone know?
>
> Thanks,
>
> deb
The following line of code is bad:
map print ("\t\"$_\"\n"), @
--- Deb <[EMAIL PROTECTED]> wrote:
> Hmmm, that's a useful work-around.
> I may use it, but I'm really interested in finding out what the
> correct invocaton of "map EXPR, LIST" would be.
> Anyone know?
> Thanks,
> deb
The problem in the stuff after the comma after the parens after a
print, lol
Hmmm, that's a useful work-around.
I may use it, but I'm really interested in finding out what the correct
invocaton of "map EXPR, LIST" would be.
Anyone know?
Thanks,
deb
Kipp, James <[EMAIL PROTECTED]> had this to say,
> if you wanted to keep the use warnings pragma in there you could u
--- Julien Motch <[EMAIL PROTECTED]> wrote:
> As it is now ,the program does not print the message sender but if
> instead of `print("$who")` I write a `print("$who\n")` the sender is
> correctly written .
At first casual glance it sounds like a buffering problem; try putting
$|++;
above the c
--- Deb <[EMAIL PROTECTED]> wrote:
>map print ("\t\"$_\"\n"), @{$HashofLists{$List} };
>
>print (...) interpreted as function at verify_lists.pl line 55.
-w always tells you if you use a construct like this that it thinks
might not be doing what you wanted. To quiet it, just switch the
s
if you wanted to keep the use warnings pragma in there you could use the CGI
carp method to send errors off to to wherever:
# at the top of the script
use CGI::Carp qw(carpout);
# redirect STDERR
# could also send errs and warning to /dev/null
open (ERRLOG, ">/tmp/err.out") or die "can't open erro
--Howdy:
-- // This is mostly for archives sake just in case I forget how //
-- // I did this //
--To recap, the purpose of this exercise was to create a few date variables
to use
--in an SQL script. I wanted the dates to have a 3 months span every time
--I run the script (which would be once a
Using
perl v5.6.1 on Solaris.
use warnings;
use strict;
I've got a hash of lists that I'm looping through:
foreach $List (sort keys %HashofLists)
{
print "Values for key \"$List\":\n";
map print ("\t\"$_\"\n"), @{$HashofLists{$List} };
}
This works just fine, except that I am get
Hi ,
I am again experiencing problem with regular expressions and how to
print them .My program retrieves some mail headers and the extract two
strings : the subject ($subject) and the sender of the mail ($who) .Then
the program has to print them .
Here is the programm :
#Print subject and sende
May be this example will helprun index.htm in
a cgi anabled directory in a web server- Original Message
-From: "Mariusz" <[EMAIL PROTECTED]>To: "perl"
<[EMAIL PROTECTED]>Sent: Tuesday, November 12, 2002 10:47
AMSubject: how did they do it?Could someone go to this page
(http://web.dai
May be this example will help you
try running the indx file in a web server within a cgi activate directory
this vwry simpal but d
- Original Message -
From: "Mariusz" <[EMAIL PROTECTED]>
To: "perl" <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 10:47 AM
Subject: how did they do it?
Build the "where" portion of your query dynamically with a whole bunch of "or"s.
my $where = '(';
for (@record_ids) {
$where .= " OR " if ($where ne '(');
$where .= "(record_id='$_')";
}
$where .= ')';
$select = "SELECT * FROM a WHERE $where";
You get the idea.
http://danconia.org
---
Mariusz wrote:
> I would like to be able to select records from the a table where record_id
> and $record_id from my @record_ids matches. I know I could go through a
> loop and send a SELECT query for each element in the array but is there a
> better way? How can I accomplish the same but only sen
my $sql = "SELECT * FROM table WHERE";
foreach $record_id ($record_ids) {
$sql .= " record_id EQ $record_id OR ";
}
Needs some tweeking but hopefully you get the idea (the last one needs to
not include the OR).
HTH
Nigel
-Original Message-
From: Mariusz [mailto:mkubis22@;hotmail
--- Mariusz <[EMAIL PROTECTED]> wrote:
> I would like to be able to select records from the a table where
> record_id and $record_id from my @record_ids matches. I know I could
> go through a loop and send a SELECT query for each element in the
> array but is there a better way? How can I accompli
I would like to be able to select records from the a table where record_id and
$record_id from my @record_ids matches. I know I could go through a loop and send a
SELECT query for each element in the array but is there a better way? How can I
accomplish the same but only sending one query?
than
Here's one way:
my @dirs = ();
my @files = ();
opendir(DIR,"/");
my @entries = readdir(DIR);
@entries = sort @entries;
foreach(@entries){
if(-d "/".$_){
push @dirs,$_;
}else{
push @files,$_;
}
}
foreach(@dirs,@files){
print $_."\n";
}
-Original Message-
From: Sukrit K Me
--- [EMAIL PROTECTED] wrote:
> From: <[EMAIL PROTECTED]>
> Date: Wed, 13 Nov 2002 03:17:32 +0900 (KST)
> To: <[EMAIL PROTECTED]>
> Subject: ¸ÞÀÏ Àü¼Û ½ÇÆÐ ¾Ë¸² <[EMAIL PROTECTED]>
>
>
> NAVER - http://www.naver.com/
>
>
> ¹ÚÁ¾Å (protbg) ´Ô²² º¸³»½Å
Sounds more like it's trying to parse it in the shell -- perl doesn't
use "then".
add this as the 1st line of the script:
#! /path/to/your/perl -w
No spaces at the beginning of the line, or any lines before it!
Be sure to say
which perl
and use that path instead of literally "/path/to/your/
--- Sukrit K Mehra <[EMAIL PROTECTED]> wrote:
> Hi listers,
> While doing this -->
> @files = readdir(Favorites);
> i get an unsorted list in @files. What i desire is directories first
> and then files. Using sort function would sort by ascii value and
sort
> by_name and such won't work too. Ple
--- Sukrit K Mehra <[EMAIL PROTECTED]> wrote:
> Hi listers,
> While doing this -->
> @files = readdir(Favorites);
> i get an unsorted list in @files. What i desire is directories first
> and then files. Using sort function would sort by ascii value and
sort
> by_name and such won't work too. Ple
Hi All,
I just installed Cygwin, and I have ActivePerl installed previously (and
still).
When I try running a perl script from the DOS command window, it works.
When I try to run it from Cygwin, I get the error:
inst.pl: 13: Syntax error: "{" unexpected (expecting "then")
I'm guessing Cygwin ha
Hi listers,
While doing this -->
@files = readdir(Favorites);
i get an unsorted list in @files. What i desire is directories first and
then files. Using sort function would sort by ascii value and sort
by_name and such won't work too. Please suggest a solution.
regards
--
sukrit || [EMAIL PROT
thanks verymuch.. the prgm working fine now!!
cheers
pravesh
Frank Wiles wrote:
.--[ Pravesh Biyani wrote (2002/11/12 at 17:49:14) ]--
|
| hi
| i have a prog which should create a file according to the date and name
| it "$date.log" and write something depending upon other things
By the way, always check your return code.
My suggestion would be to use
open OUTFILE, $OUTFILE or die $!;
--- Paul <[EMAIL PROTECTED]> wrote:
> > | $probefile = " > | $OUTFILE = ">>$probe_logfile";
> > | open(probefile) or die("ERROR: $! \n");
> > | open(OUTFILE) or die ("ERRROR :$! \n
> | $probefile = " | $OUTFILE = ">>$probe_logfile";
> | open(probefile) or die("ERROR: $! \n");
> | open(OUTFILE) or die ("ERRROR :$! \n");
> You're not using open() correctly. You need to have something
> along the lines of:
> open(PROBE, $profile);
> open(OUT, $OUTFILE);
Actu
--- Pravesh Biyani <[EMAIL PROTECTED]> wrote:
> i have a prog which should create a file according to the date
> and name it "$date.log" and write something depending upon
> other things in it! Here is the code.. which refuses to work
> any clues.. ?
> $prefix_file = ` date '+%x' ` ;
accordin
.--[ Pravesh Biyani wrote (2002/11/12 at 17:49:14) ]--
|
| hi
| i have a prog which should create a file according to the date and name
| it "$date.log" and write something depending upon other things in it!
| Here is the code.. which refuses to work
|
| any clues.. ?
|
hi
i have a prog which should create a file according to the date and name
it "$date.log" and write something depending upon other things in it!
Here is the code.. which refuses to work
any clues.. ?
TIA
pravesh
--
#!/usr/bin/perl -w
Julien Motch wrote:
>
> Hello ,
Hello,
> I am new to perl and here is my problem .I have written a programm which
> checks my mail and sends me instant message via gabber when 10 or more
> mail arrive or when a special sender writes me .The problem is that I
> receive the message head in
Hi,
I am still a newbie to Perl.
I am assigned to write a Perl program to monitor a memory leak on an
application running on a Sun system - Solaris. Now, I'm a Windows NT System
Administrator...so, I am trying to transition over to Unix and don't know
where to start. Can someone point me in the r
--- Julien Motch <[EMAIL PROTECTED]> wrote:
> I am new to perl and here is my problem .I have written a programm
> which checks my mail and sends me instant message via gabber when
> 10 or more mail arrive or when a special sender writes me .
> The problem is that I receive the message head in one
Hello ,
I am new to perl and here is my problem .I have written a programm which
checks my mail and sends me instant message via gabber when 10 or more
mail arrive or when a special sender writes me .The problem is that I
receive the message head in one string .I want to isolate the line w
--- James Parsons <[EMAIL PROTECTED]> wrote:
> Good Morning all
Good morning, James. =o)
> Since I'm still a Newbie when it comes to Perl , so my question may
> sound fairly simple to the group but here goes..
> I need to create a file that has the localtime - 1 day and -2 days.
> and then
--- PRADEEP GOEL <[EMAIL PROTECTED]> wrote:
> i have a file(say f1) containing patch names
> pach_2377
> pach_2676
> pach_3897
> I want to check if there are(is) patch _id(s) which r greater than
> given patch_id
> (say : pach_2579)
> pls tell me how to do that in perl
> i.e.
> while () {
I'm wondering how one could arrange to have a vi like editor to use
during , something like is available in Ksh88 and ksh93, but
not pdksh.
Where during stdin to program one can have vi like commands available
for editing the input.
Example can be seen by invoking ksh (88 or 93) like:
ksh read l
On Mon, 11 Nov 2002 09:49:29 -0600, [EMAIL PROTECTED] (Janfek
Esquivel) wrote:
>I'm having problems installing Perl 5.8 in a server with Solaris 8
>(Developers Installation), because when I want to install Berkley DB I keep
>getting an error message that there's a file missing (libdb.a), I don't
.--[ James Parsons wrote (2002/11/12 at 09:22:00) ]--
|
| Good Morning all
|
| Since I'm still a Newbie when it comes to Perl , so my question may sound
| fairly simple to the group but here goes..
|
| I need to create a file that has the localtime - 1 day and -2 days.
Good Morning all
Since I'm still a Newbie when it comes to Perl , so my question may sound
fairly simple to the group but here goes..
I need to create a file that has the localtime - 1 day and -2 days. and
then redirect this to 2 separate files.
thanks in advance.
James Parsons.
--
To
On Tuesday 12 November 2002 01:00, PRADEEP GOEL wrote:
Content-Type: Multipart/Alternative; name="Attachment: 0"
Content-Transfer-Encoding: 7bit
Content-Description:
Content
Through private communication I've been informed that another list
member has received an email message from
'[EMAIL PROTECTED]'
with a subject line of
'Weekly postins statitistics - 37/2002'.
This email message contained the so-called 'W32.Bugbear@mm' virus.
I posted this message f
on Tue, 12 Nov 2002 04:47:04 GMT, [EMAIL PROTECTED] (Mariusz)
wrote:
> They give an option to save ads for later display on one page. I
> looked up the source code and noticed that all their checkboxes
> have the same name (printad) and the values grow from zero up.
> That's easy, but how do you
on Tue, 12 Nov 2002 10:11:05 GMT, [EMAIL PROTECTED] (Ben Crane) wrote:
> anyone know how to use perl scripts WITHIN a VB
> application? I want to get a directory listing of
> certain files into a VB array and wanted to use some
> of my already created perl scripts...
Check out ActiveState's Perl
HI list,
anyone know how to use perl scripts WITHIN a VB
application? I want to get a directory listing of
certain files into a VB array and wanted to use some
of my already created perl scripts...
thanx
Ben
__
Do you Yahoo!?
U2 on LAUNCH - Exclus
HI list,
anyone know how to use perl scripts WITHIN a VB
application? I want to get a directory listing of
certain files into a VB array and wanted to use some
of my already created perl scripts...
thanx
Ben
__
Do you Yahoo!?
U2 on LAUNCH - Exclus
Hi, Dan !
DId you place the config.cgi in one of these directories ?
> Can't locate config.cgi in @INC (@INC contains:
> /usr/local/lib/perl5/5.6.0/i386-bsdos /usr/local/lib/perl5/5.6.0
> /usr/local/lib/perl5/site_perl/5.6.0/i386-bsdos
> /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/s
You can use the following regex to get the patch
number
chomp( $ch ); # remove the newline character
my ($pnum) = substr( $ch, 5 ); #grab everything after the
pach_
Then you can say
if( $given_patchid > $pnum ) { #compare
numerically
...
}
To sort the patches you can say
@patches = ;
i have a file(say f1) containing patch names
pach_2377
pach_2676
pach_3897
I want to check if there are(is) patch _id(s) which r greater than given patch_id
(say : pach_2579)
pls tell me how to do that in perl
i.e.
while ()
{
$ch = $_;
if ($given_patchid gt $ch ) ## pls tell
60 matches
Mail list logo