Re: AW: Regexp match question !

2004-03-30 Thread Daniel Stellwagen
Schell, Holger wrote: Hi, Maybe not the best solution but try something like this \b[0-9]\b Means that there are boundaries before and after and in the middle should be a one digitnumber \b\d\b works similar. ? is searching step by step, so this means: $number = 11; it starts with searching for a

Antwort: Project Advice Wanted

2004-03-30 Thread Manfred . Beilfuss
Hi, there is a open source ticketing-system which I think to be perl-based. Sören a member of our FrankfurtPM ( see http://frankfurt.perlmongers.de/wiki/?SörenM.LairdSörries ) reported about it in our internal email-list some time ago. Sadly I have to admit that I forgot most about it. But I hope

Regexp match question !

2004-03-30 Thread Daniel Stellwagen
Hi everybody, I am a beginner of programming ( so I am a beginner of perl programming too :-) ) and I have this very basic problem but cannot handle it. I'm trying to match only a one single digit and wrote this code: use strict; my $number = 11; # two-digit number if ( $number =~ /\d{1}\b/ )

Re: how do I write a regex that looks for 'X' 'NOT Y' 'Z'

2004-03-30 Thread Bram Mertens
On Wed, 2004-03-31 at 03:43, Harry Putnam wrote: [...] > > I already have a rule that does what you suggested, it looks like: > > headerM8RAM_FAKE_FROM From =~ > > /(?/ > > score M8RAM_FAKE_FROM 1.0 > > describe M8RAM_FAKE_FROM From contains my address but I didn't send this! > > Is t

Re: How to determine if STDIN has piped data?

2004-03-30 Thread Bryan Harris
> On Mon, 29 Mar 2004 00:38:50 -0700 > Bryan Harris <[EMAIL PROTECTED]> wrote: > >>> Alternatively, you can use the '-t' operator: >>> >>> exit 0 if -t STDIN >> >> >> I've been waiting for this for a LONG time, thanks Smoot. > > No problem. It took me a while to find the correct operator as

Re: how do I write a regex that looks for 'X' 'NOT Y' 'Z'

2004-03-30 Thread Harry Putnam
Bram Mertens <[EMAIL PROTECTED]> writes: > From: Bram Mertens <[EMAIL PROTECTED]> > Subject: Re: how do I write a regex that looks for 'X' 'NOT Y' 'Z' > To: perl beginners-digest mailing list <[EMAIL PROTECTED]> > Date: Tue, 30 Mar 2004 18:27:58 +0200 > Message-Id: <[EMAIL PROTECTED]> > > On Tue,

Re: Sorting Problems

2004-03-30 Thread R. Joseph Newton
Nigel Peck - MIS Web Design wrote: > Hi all, > > I'm sure I'm just being stupid here but I can't see where: > > I have an array of hash references that I'm trying to sort by one of the > key/value pairs in the hashes (see code below). > > I get various errors, the current one being: > > Can't coer

Re: determing number of records returned with DBI

2004-03-30 Thread JupiterHost.Net
Smoot Carl-Mitchell wrote: On Tue, 30 Mar 2004 16:00:41 -0600 "JupiterHost.Net" <[EMAIL PROTECTED]> wrote: I'd rewrite the way you're doing it: my @records = @{$dbh->selectall_arrayref($query)}; print "Your search returned $#records results."; for(@records) { ... } $#records returns th

Re: What is happening here

2004-03-30 Thread Paul Johnson
On Tue, Mar 30, 2004 at 04:57:07PM -0800, R. Joseph Newton wrote: > Jeff 'japhy' Pinyan wrote: > > > On Mar 30, WC -Sx- Jones said: > > > > >my $count; > > > > > >while(1) { > > > (++$count) ? $count += $count-- : $count += $count++; > > > > > > print "$count\n"; exit if $count > 60_000; > > >

Re: What is happening here

2004-03-30 Thread R. Joseph Newton
Jeff 'japhy' Pinyan wrote: > On Mar 30, WC -Sx- Jones said: > > >my $count; > > > >while(1) { > > (++$count) ? $count += $count-- : $count += $count++; > > > > print "$count\n"; exit if $count > 60_000; > > sleep 1; > >} > > The main problem is the PRECEDENCE. Your ? : line is run like so:

Re: What is happening here

2004-03-30 Thread R. Joseph Newton
WC -Sx- Jones wrote: > WC -Sx- Jones wrote: > > What is happening here - > > while(1) { > > (++$count) ? $count += $count-- : $count += $count++; > > > > :) May I ask a different way? > > #! /usr/bin/perl > use strict; > use warnings; > > my $count; > my $str; > > while(1) { >(++$count) ? $c

Re: determing number of records returned with DBI

2004-03-30 Thread Smoot Carl-Mitchell
On Tue, 30 Mar 2004 16:00:41 -0600 "JupiterHost.Net" <[EMAIL PROTECTED]> wrote: > I'd rewrite the way you're doing it: > > my @records = @{$dbh->selectall_arrayref($query)}; > print "Your search returned $#records results."; > for(@records) { > ... > } $#records returns the index of

Re: determing number of records returned with DBI

2004-03-30 Thread JupiterHost.Net
Andrew Gaffney wrote: > Is there a way to find out how many records were returned with a DBI > query? There's the obvious counting each record as you fetch it, but I > need the count before I start going through them. I'd rewrite the way you're doing it: my @records = @{$dbh->selectall_arrayref(

RE: What is happening here

2004-03-30 Thread Charles K. Clarkson
WC -Sx- Jones <[EMAIL PROTECTED]> wrote: : : PS - I am admit that I am likely in the middle of : a nervous break-down LOL :) You should be in just the right frame of mind for delving into Parse::RecDecent. :) Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe,

RE: Sorting Problems

2004-03-30 Thread Charles K. Clarkson
Nigel Peck - MIS Web Design <[EMAIL PROTECTED]> wrote: : : Hi all, : : I'm sure I'm just being stupid here but I can't see where: : : I have an array of hash references that I'm trying to sort by : one of the key/value pairs in the hashes (see code below). : : I get various errors, the current

Re: determing number of records returned with DBI

2004-03-30 Thread Radhika Sambamurti
On Tue, 30 Mar 2004 11:04:49 -0600 Andrew Gaffney <[EMAIL PROTECTED]> wrote: > Is there a way to find out how many records were returned with a DBI query? There's > the > obvious counting each record as you fetch it, but I need the count before I start > going > through them. > Hi, I found t

Re: What is happening here

2004-03-30 Thread WC -Sx- Jones
#! /usr/bin/perl use strict; use warnings; my $count; my $index; my $str; while (++$index) { $count = $index; while(1) { (++$count) ? $count += $count-- : $count += $count++; $str = unpack("B32", pack("N", $count)); print "$count \tis binary $str\n"; last if $coun

RE: Using the read function with an offset

2004-03-30 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > Hi! > > I'm writing some 68k modules, for disassembly, assembly, reading > instructions, analysing instructions, etc. > > The package I'm stuck on is supposed to read a 16bit instruction, and > then break it down into an array, with each element seperated. > > So far,

RE: determing number of records returned with DBI

2004-03-30 Thread Guay Jean-Sébastien
Hi again Andrew, > With the mysql driver, it does return the number of fetched > rows before you start > iterating through them. It does what I need it to do. Thanks. Ok, but that behaviour is probably specific to DBD::MySQL, and can't be relied upon if you change to another DBD... I would use

Re: determing number of records returned with DBI

2004-03-30 Thread Andrew Gaffney
Guay Jean-Sébastien wrote: Hello Andrew, Is there a way to find out how many records were returned with a DBI query? There's the obvious counting each record as you fetch it, but I need the count before I start going through them. I was looking through the DBI documentation (perldoc DBI) no

Using the read function with an offset

2004-03-30 Thread Lolbassett
Hi! I'm writing some 68k modules, for disassembly, assembly, reading instructions, analysing instructions, etc. The package I'm stuck on is supposed to read a 16bit instruction, and then break it down into an array, with each element seperated. So far, I'm trying to read 16bits, at an offset s

RE: determing number of records returned with DBI

2004-03-30 Thread Guay Jean-Sébastien
Hello Andrew, > Is there a way to find out how many records were returned > with a DBI query? There's the > obvious counting each record as you fetch it, but I need the > count before I start going > through them. I was looking through the DBI documentation (perldoc DBI) not long ago and this

Re: What is happening here

2004-03-30 Thread Jeff 'japhy' Pinyan
On Mar 30, WC -Sx- Jones said: >my $count; > >while(1) { > (++$count) ? $count += $count-- : $count += $count++; > > print "$count\n"; exit if $count > 60_000; > sleep 1; >} The main problem is the PRECEDENCE. Your ? : line is run like so: ((++$count) ? ($count += $count--) : $count) +=

determing number of records returned with DBI

2004-03-30 Thread Andrew Gaffney
Is there a way to find out how many records were returned with a DBI query? There's the obvious counting each record as you fetch it, but I need the count before I start going through them. -- Andrew Gaffney Network Administrator Skyline Aeronautics, LLC. 636-357-1548 -- To unsubscribe, e-mail:

Re: Compilation

2004-03-30 Thread WC -Sx- Jones
Wiggins d Anconia wrote: (attribute missing from OP) is there a way to compile perl programs without perlcc or is there any other way to hide my source code? perldoc -q 'hide the source' True - however ... The ONLY way to hide the source is to render it completely unmaintainable by any reasonally

Re: What is happening here

2004-03-30 Thread WC -Sx- Jones
WC -Sx- Jones wrote: What is happening here - while(1) { (++$count) ? $count += $count-- : $count += $count++; :) May I ask a different way? #! /usr/bin/perl use strict; use warnings; my $count; my $str; while(1) { (++$count) ? $count += $count-- : $count += $count++; $str = unp

Sorting Problems

2004-03-30 Thread Nigel Peck - MIS Web Design
Hi all, I'm sure I'm just being stupid here but I can't see where: I have an array of hash references that I'm trying to sort by one of the key/value pairs in the hashes (see code below). I get various errors, the current one being: Can't coerce array into hash at /web/secure.miswebdesign.com.o

Sorting Problems

2004-03-30 Thread Nigel Peck - MIS Web Design
Hi all, I'm sure I'm just being stupid here but I can't see where: I have an array of hash references that I'm trying to sort by one of the key/value pairs in the hashes (see code below). I get various errors, the current one being: Can't coerce array into hash at /web/secure.miswebdesign.com.o

Re: how do I write a regex that looks for 'X' 'NOT Y' 'Z'

2004-03-30 Thread Bram Mertens
On Tue, 2004-03-30 at 17:37, Harry Putnam wrote: [...] > You may get some REALLY inventive regex here... I have before. > But I think you're working too hard and should resort to > spamassassins own tools. This can be done with a push/pull technique. > > Investigate spamassassins `meta' handle.

Re: Project Advice Wanted

2004-03-30 Thread Daniel Staal
--As of Tuesday, March 30, 2004 10:59 AM -0500, Steve Gross is alleged to have said: 1) Any good Perl/other tool to create screens/web pages? 2) any recommended database interfaces? I've use ODBC and would like to make it general enough to handle a wide variety of conventional databases

Re: Project Advice Wanted

2004-03-30 Thread Chance Ervin
Save yourself a lot of headache, and use RT: http://www.bestpractical.com -- - InteleNet Communications Inc. "Help me help you." Chance Ervin - SCSA -- Jerry Maguire Oracle Certified Professional Operations Supervisor - Original Messa

RE: Project Advice Wanted

2004-03-30 Thread Marcos . Rebelo
1) Now the problem is to chose. ASP, PHP, Pyton, ... 2) If you consider to be free from OS use the DBD/DBI for DB. There is already installed module in Win32 package for ODBC if you just need Windows. 3) In the Template area I use HTML::Template. Marcos -Original Message- From: Steve Gr

Re: Project Advice Wanted

2004-03-30 Thread Chance Ervin
Save yourself a lot of headache, and use RT: http://www.bestpractical.com -- - InteleNet Communications Inc. "Help me help you." Chance Ervin - SCSA -- Jerry Maguire Oracle Certified Professional Operations Supervisor - Original Messa

Project Advice Wanted

2004-03-30 Thread Steve Gross
I'm at the start of a medium-sized trouble-ticket project that I want to write in Perl. This project will have a front-end web interface, Perl for the CGI and a database in the back end. It will live in the Windows domain. I'm looking for general advice on these topics: 1) Any good Perl/o

Re: Pause/Hold in Perl

2004-03-30 Thread Morbus Iff
>Is there a way in Perl to have a script wait 30 seconds before it >continues processing? Like or a pause or hold? sleep(). -- Morbus Iff ( black as the devil and sweet as a stolen kiss ) Technical: http://www.oreillynet.com/pub/au/779 Culture: http://www.disobey.com/ and http://www.gamegrene.c

Re: Pause/Hold in Perl

2004-03-30 Thread James Edward Gray II
On Mar 30, 2004, at 9:43 AM, Anthony J Segelhorst wrote: Is there a way in Perl to have a script wait 30 seconds before it continues processing? Like or a pause or hold? Yes: sleep 30; James -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Pause/Hold in Perl

2004-03-30 Thread Anthony J Segelhorst
Is there a way in Perl to have a script wait 30 seconds before it continues processing? Like or a pause or hold? Anthony J Segelhorst Enterprise Systems Management Team Phone: 937-495-1876 Email: [EMAIL PROTECTED] This ema

Re: how do I write a regex that looks for 'X' 'NOT Y' 'Z'

2004-03-30 Thread Harry Putnam
Bram Mertens <[EMAIL PROTECTED]> writes: > Somebody suggested to use a rule like: > /From\:\s".*"\s*/i > > And another rule to catch the 2 exceptions. But the .* means that the > parser might test the entire e-mail making the test slow and heavy on > memory-usage. > Something like: > /From\:\s".{

Re: interpolated strings

2004-03-30 Thread Adam
Bryan, I'm no pro, but I can help a bit. You interpolate variables in a double-quote "". my($name) = 'Adam'; print("My name is $name\n"); # Prints `My name is Adam` with a return at the end. or more to your question my($name); chomp($name = ); print("His name is $nam

Re: Execute include and return variables

2004-03-30 Thread R. Joseph Newton
Tomas Corral wrote: > Hi all: Hi Tomas, Please start a new message to the group when you have a new subject. Your message was lost in a thread concerning Network Shiffer Modules. > > > I cannot include a file so it can return all the variables I assigned. > > #FILE1.pl > $var1= "tom"; > > #FIL

Re: Execute include and return variables

2004-03-30 Thread R. Joseph Newton
Alok Bhatt wrote: > > Hi all: > Hi Tomas, > > I cannot include a file so it can return all the > > variables I assigned. > > #FILE1.pl > > $var1= "tom"; > > #FILE2.pl > > do FILE1.pl > > #open $prog,'FILE1.pl' or die $!, > > #use 'FILE1.pl' > > #import 'FILE1.pl' > > In FIle2: > do "FILE1.pl" (us

Re: string change problem

2004-03-30 Thread Wiggins d Anconia
Please bottom post. > Hello All, > > I am really very happy to receive the detailful response from you all.It is great. > Thanks for all helping me to start my knowledge on PERL programming. > 'perl' or 'Perl', never 'PERL'. perldoc -q '"Perl"' http://danconia.org -- To unsubscr

Re: Compilation

2004-03-30 Thread Wiggins d Anconia
> is there a way to compile perl programs without perlcc or is there any > other way to hide my source code? > perldoc -q 'hide the source' http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Antwort: Compilation

2004-03-30 Thread Manfred . Beilfuss
yes Sir , there are several possibilities e.g. perlapp : J:\mbf>perlapp -? PerlApp 5.0.3 build 503 Copyright (C) 1998-2002 ActiveState Corp. All rights reserved. Usage: perlapp [options...]

Compilation

2004-03-30 Thread max4o
is there a way to compile perl programs without perlcc or is there any other way to hide my source code? - This mail is from: <[EMAIL PROTECTED]> - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

how do I write a regex that looks for 'X' 'NOT Y' 'Z'

2004-03-30 Thread Bram Mertens
Hi I'm trying to write a rule for SpamAssassin that looks for the following in a message: "From: " followed by "anything BUT 'Mertens Bram' or 'Bram Mertens'" followed by "" So these two shouldn't trigger the rule: From: Bram Mertens From: Mertens Bram But something like this should trigger it

RE: Incrementing count

2004-03-30 Thread Ichim, Adrian N.
> - Original Message - > From: <[EMAIL PROTECTED]> > To: > Sent: Monday, March 29, 2004 6:20 AM > Subject: Incrementing count > > > > I'm sorry, the previous subject should have been changed. > My apologies. > > > > > > while () { > >$counter++; > > } > > > > I know this is prob

Re: Execute include and return variables

2004-03-30 Thread Alok Bhatt
> Hi all: Hi Tomas, > I cannot include a file so it can return all the > variables I assigned. > #FILE1.pl > $var1= "tom"; > #FILE2.pl > do FILE1.pl > #open $prog,'FILE1.pl' or die $!, > #use 'FILE1.pl' > #import 'FILE1.pl' In FIle2: do "FILE1.pl" (use double quotes) If you want to use "use "

Re: psync, sym links, and Panther Revisited

2004-03-30 Thread Bill Metzinger
On Mar 29, 2004, at 11:36 PM, WC -Sx- Jones wrote: If you *are* backing-up your system - please see this first and avoid data loss. I mean Perl is great - no doubt. Sometimes system utils are needed: http://www.oreillynet.com/cs/user/view/cs_msg/4644 Well thanks I think. Your article's main pr

Execute include and return variables

2004-03-30 Thread Tomas Corral
Hi all: I cannot include a file so it can return all the variables I assigned. #FILE1.pl $var1= "tom"; #FILE2.pl do FILE1.pl #open $prog,'FILE1.pl' or die $!, #use 'FILE1.pl' #import 'FILE1.pl' print("var1=$var1"); I hanged arround perldoc perlfunc and google and... I guess I need help Th

Re: string change problem

2004-03-30 Thread Muthukumar
Hello All, I am really very happy to receive the detailful response from you all.It is great. Thanks for all helping me to start my knowledge on PERL programming. Thanks, Muthukumar. - Original Message - From: "Charles K. Clarkson" <[EMAIL PROTECTED]> To: "'MuthuKumar'" <[EM

Re: Parsing the hyperlink?

2004-03-30 Thread Ron B
Thanks. I think I'll use regex this time, 'cause it fits the purpose good enough. But it's really nice thing to know the module for the future versions of my script. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Createing a email and placing it in Lotus Notes outbox

2004-03-30 Thread John
Ned, Sorry I can't help you with the specifics of Lotus Notes, but regarding your google attempt, you might try "perl+email+lotus+notes" as your search string. I got over 52,000 hits for this. There's gotta be *something* in that to help you avoid re-inventing the wheel. John-- > -Original

Re: warn ?!

2004-03-30 Thread Randy W. Sims
Paul Johnson wrote: use Scalar::Util "dualvar"; my $ns = dualvar 42, 'The Answer to Life, the Universe, and Everything'; printf("as number = '%d', as string = '%s'\n", $ns, $ns); doh! I /knew/ there was a module that did that. I looked for it, but I just couldn't seem to find it. -- To unsubscr

RE: Createing a email and placing it in Lotus Notes outbox

2004-03-30 Thread John
Ned, Sorry I can't help you with the specifics of Lotus Notes, but regarding your google attempt, you might try "perl+email+lotus+notes" as your search string. I got over 52,000 hits for this. There's gotta be *something* in that to help you avoid re-inventing the wheel. John-- > -Original