RE: Security Question (follow-up question)

2001-07-31 Thread Bob Mangold
This is somewhat alarming to me because I hadn't realized this potential before, but is there an easy way to check what is being opened. Would using a -f() or -d() to verify that you were actually opening a file or directory do the trick? -Bob --- Mooney Christophe-CMOONEY1 <[EMAIL PROTECTED]> w

Re: (MORE INFO) loose matching with regex

2001-07-28 Thread Bob Mangold
ted) and still consider it a match? > > Or a combination of the above? > > Without this information, no reply is even remotely correct. Please > provide more information about the problem to get closer to the solution > to your problem. > > Hope this helps,,, > > Azi

loose matching with regex

2001-07-28 Thread Bob Mangold
Hello, I'm working on a program where I am searching for a short string within a longer string. The catch is that the long string is about 4.5 million chars long and the short string is about 500. Using a regex to do an exact match is simple, but what if I want just a close match, like 80% or wha

multiprocessors and perl

2001-07-10 Thread Bob Mangold
I'm about to upgrade to a dual processor sunblade 1000 at work (absolute overkill), but before doing so I'm trying to figure out what I'm going to have to do to exploit both processors. - Do I need to install perl with any special options? - Will I need to start writing my scripts differently to

(solution) Re: STDIN and STDOUT

2001-07-10 Thread Bob Mangold
As mentioned eariler... --- Craig Moynes/Markham/IBM <[EMAIL PROTECTED]> wrote: You mentioned in the earlier email that you were calling your perl script via 'exec' (as I remember). Could you not use something like exec(' myperl.pl 2>&1 ' ) ? ok, this works, but what the heck is it doing. i've

Re: STDIN and STDOUT

2001-07-10 Thread Bob Mangold
> Are you sure it's STDERR? Some write directly to ther terminal > screen... > I checked through the module code and it definitely says 'print STDERR ...'. > What is this module? The module is 'bioperl' (used for genetic analysis). __ Do You Ya

Re: STDIN and STDOUT

2001-07-10 Thread Bob Mangold
> Does anybody know why he shouldn't do the following? > > *STDERR = *STDOUT; > This is what I orignally tried, and is didn't really work. I think my problem lies in the fact that I am hoping to make the change in a module that I am 'use'ing. So I tried all of the suggestions, but it seemed tha

STDIN and STDOUT

2001-07-10 Thread Bob Mangold
Hello, I sent an email yesterday, but never heard anything. Maybe it was the word 'php' in the subject, but let me just simplify and ask another way. Is there a way to automatically direct all STDERR output to STDOUT. A module I have installed automatically creates STDERR output, but I want that

perl / php question

2001-07-09 Thread Bob Mangold
Hello, I'm not sure if anyone here can help me with this, but at least some direction in where to to look would be great. I'm using a php script so call (via exec) a perl script. The STDOUT from perl is automatically forwarded through the php script and displayed on the web page. My problem howe

referncing hashes of array references

2001-07-05 Thread Bob Mangold
if I have a hash that contains array refs as its values and I create a reference for it, what are the different ways that i can access the information in the array? for example. my %hash; my @array = ('red','white','blue'); $hash{'foo'} = \@array; my $hashREF = \%hash; print ${${$hashREF}{'foo'}

using the backspace \b character

2001-07-02 Thread Bob Mangold
Hello, I know I can use the backspace character to overwrite previous characters and the such, but can I use it to backup a few lines. Lets say I write: print "hello\n"; print "world"; I know that: print "\b"; print "a"; will replace the 'd' in 'world' with an 'a', but is there away to backsp

Re: loop counting

2001-06-29 Thread Bob Mangold
ft off, or what the last matched item was, or what line of a file it's reading, that it might be keeping track of this too. -Bob --- Paul <[EMAIL PROTECTED]> wrote: > > --- Bob Mangold <[EMAIL PROTECTED]> wrote: > > Is there a perl variable that automatically counts loop

loop counting

2001-06-29 Thread Bob Mangold
Is there a perl variable that automatically counts loop iterations. Such that I don't have to use '$count': foreach (@array){ $count++; ..whatever.. } ? Thanks, Bob __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http:

Fwd: Re: variable losing it's value

2001-06-19 Thread Bob Mangold
--- Bob Mangold <[EMAIL PROTECTED]> wrote: > Date: Tue, 19 Jun 2001 19:40:51 -0700 (PDT) > From: Bob Mangold <[EMAIL PROTECTED]> > Reply-to: [EMAIL PROTECTED] > Subject: Re: variable losing it's value > To: Michael Fowler <[EMAIL PROTECTED]> > > B

Re: variable losing it's value

2001-06-19 Thread Bob Mangold
g line. If this is the case then why does perl localize it anyway. If i'm declaring it before that loop shouldn't its scope carry through the loop? -Bob --- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > On Jun 19, Bob Mangold said: > > >I may have a bug

variable losing it's value

2001-06-19 Thread Bob Mangold
I may have a bug somewhere in my code, but I can't find it. Before I look again though please answer this for me. If I execute: my ($line) = "hello"; foreach $line (<>){ . whatever } print $line; Should it print the last line in <> or 'hello'? -Bob

readline

2001-06-15 Thread Bob Mangold
I'm having trouble reading STDIN. This works: $a = readline STDIN; print $a; # prints out whatever was inputed But the does not work: use strict; $a = readline ; # forced to use print $a; # prints nothing __ Do You Yahoo!? Get personalized emai

counting regex matches

2001-06-14 Thread Bob Mangold
Is there a simple way to know how many times a regex matches. Say for example: $string =~ /a/g; # match on all 'a' in $string Now how do I know how many times it actually matched? -Bob __ Do You Yahoo!? Get personalized email addresses from Yahoo

Re: Comparing two files

2001-06-06 Thread Bob Mangold
Reading the files into hashes is definitely the answer. If you need an example look at section 5.11 of the Perl Cookbook. -Bob --- Eduard Grinvald <[EMAIL PROTECTED]> wrote: > As suggested earlier for a similiar problem, dumping everything into a > single hash as keys and then printing that out

Re: Fwd: 'use' question

2001-06-05 Thread Bob Mangold
??? -Bob --- Chas Owens <[EMAIL PROTECTED]> wrote: > Can you post an example script? > > On 05 Jun 2001 12:03:03 -0700, Bob Mangold wrote: > > Hello, > > > > It seems that whenever I attempt to use the 'use' command, I get an error. > The > > er

Fwd: 'use' question

2001-06-05 Thread Bob Mangold
Hello, It seems that whenever I attempt to use the 'use' command, I get an error. The error says '"use" not allowed in expression at..'. Funny thing is that I have CGI scripts that execute just fine from the command-line. I've tried creating just very simple programs and I always get the erro