Re: match only a-z or 0-9

2002-11-12 Thread David Buddrige
[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

Module constants

2002-11-12 Thread Tom Allison
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

match only a-z or 0-9

2002-11-12 Thread Alex Cheung Tin Ka
Dear All, Could anyone tell me how to make a regular expression for match a string only [a-z0-9] ? Thanks

Zip Files

2002-11-12 Thread max . calvo
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

RE: Sending mail under Windows 95/2000

2002-11-12 Thread Timothy Johnson
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

Re: How to get a vi like editor during STDIN

2002-11-12 Thread Steve Grazzini
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

Re: sorting directories

2002-11-12 Thread John W. Krahn
"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

Re: set date variable and range - SOLVED

2002-11-12 Thread John W. Krahn
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

Re: sorting directories

2002-11-12 Thread John W. Krahn
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

Re: some doubt!

2002-11-12 Thread John W. Krahn
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 > > -- >

Re: map EXPR, LIST

2002-11-12 Thread Paul
--- 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

Re: map EXPR, LIST

2002-11-12 Thread Deb
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

Re: map EXPR, LIST

2002-11-12 Thread Ovid
--- 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"), @

Re: map EXPR, LIST

2002-11-12 Thread Paul
--- 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

Re: map EXPR, LIST

2002-11-12 Thread Deb
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

Re: string can not be printed

2002-11-12 Thread Paul
--- 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

Re: map EXPR, LIST

2002-11-12 Thread Paul
--- 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

RE: map EXPR, LIST

2002-11-12 Thread Kipp, James
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

RE: set date variable and range - SOLVED

2002-11-12 Thread Johnson, Shaunn
--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

map EXPR, LIST

2002-11-12 Thread Deb
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

string can not be printed

2002-11-12 Thread Julien Motch
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

Re: how did they do it?

2002-11-12 Thread LRMK
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

Re: how did they do it?

2002-11-12 Thread LRMK
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?

RE: perl & MySQL

2002-11-12 Thread wiggins
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 ---

Re: perl & MySQL

2002-11-12 Thread david
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

RE: perl & MySQL

2002-11-12 Thread Nigel Peck - MIS Web Design
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

Re: perl & MySQL

2002-11-12 Thread Paul
--- 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

perl & MySQL

2002-11-12 Thread Mariusz
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

RE: sorting directories

2002-11-12 Thread Timothy Johnson
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

is anyone else getting "¸ÞÀÏ Àü¼Û ½ÇÆÐ ¾Ë¸² "????

2002-11-12 Thread Paul
--- [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) ´Ô²² º¸³»½Å

Re: Cygwin and Perl

2002-11-12 Thread Paul
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/

Re: sorting directories [correction]

2002-11-12 Thread Paul
--- 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

Re: sorting directories

2002-11-12 Thread Paul
--- 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

Cygwin and Perl

2002-11-12 Thread Patel, SamirX K
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

sorting directories

2002-11-12 Thread Sukrit K Mehra
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

Re: some doubt!

2002-11-12 Thread Pravesh Biyani
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

Re: some doubt!

2002-11-12 Thread Paul
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

Re: some doubt!

2002-11-12 Thread Paul
> | $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

Re: some doubt!

2002-11-12 Thread Paul
--- 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

Re: some doubt!

2002-11-12 Thread Frank Wiles
.--[ 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.. ? |

some doubt!

2002-11-12 Thread Pravesh Biyani
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

Re: grep programm in Perl

2002-11-12 Thread John W. Krahn
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

Newbie - Help with writing a memory leak script for an applicatio n...

2002-11-12 Thread Yuen, Alex
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

Re: grep programm in Perl

2002-11-12 Thread Paul
--- 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

grep programm in Perl

2002-11-12 Thread Julien Motch
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

Re: Perl question

2002-11-12 Thread Paul
--- 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

Re: a simple pattern matching quesn

2002-11-12 Thread Paul
--- 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 () {

How to get a vi like editor during STDIN

2002-11-12 Thread Harry Putnam
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

Re: Installation Problem

2002-11-12 Thread zentara
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

Re: Perl question

2002-11-12 Thread Frank Wiles
.--[ 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.

Perl question

2002-11-12 Thread James Parsons
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

Re: a simple pattern matching quesn

2002-11-12 Thread John W . Krahn
On Tuesday 12 November 2002 01:00, PRADEEP GOEL wrote: Content-Type: Multipart/Alternative; name="Attachment: 0" Content-Transfer-Encoding: 7bit Content-Description: Content

[OT]: URGENT virus warning

2002-11-12 Thread Felix Geerinckx
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

Re: how did they do it?

2002-11-12 Thread Felix Geerinckx
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

Re: Integrating Perl scripts in VB?

2002-11-12 Thread Felix Geerinckx
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

Integrating Perl scripts in VB?

2002-11-12 Thread Ben Crane
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

Integrating Perl scripts in VB?

2002-11-12 Thread Ben Crane
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

Re: Need Help With Perl! I'm Lost!

2002-11-12 Thread Jan Gruber
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

Re: a simple pattern matching quesn

2002-11-12 Thread Tanton Gibbs
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 = ;

a simple pattern matching quesn

2002-11-12 Thread PRADEEP GOEL
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