Re: eval and __LINE__

2003-09-07 Thread Beau E. Cox
- Original Message - From: "Hacksaw" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, September 06, 2003 8:38 PM Subject: eval and __LINE__ > Caveat: It's late and I'm tired and frustrated, i.e. I'm pissy. > > I want to have something like die, but for the web, so I want it to

Re: eval and __LINE__

2003-09-07 Thread Hacksaw
>1) use Carp; - it shows errors from the caller's >perspective. Look at the docs, but you car use >'carp' (warinig) or 'croak' (die). >2) the perl built-in function 'caller' gives line and >script name information for the caller, the caller's >caller, etc. Check the docs to roll you

problem with PDF::Report and images (uses PDF::API2)

2003-09-07 Thread Kevin Pfeiffer
Hi all, I'm trying out some PDF modules and have had some success with PDF::Report (http://search.cpan.org/author/AORR/PDF-Report-1.10/Report.pm) adding text and primitive graphics. PD::Report is a wrapper for PDF::API2. But I'm not having any luck inserting images. Here are the instructions:

system function wont redirect output

2003-09-07 Thread Steve
hey, in my program im just trying to redirect the commands output but i get the error: sh: line 1: 1: command not found code: $return = system("tar czvf $tar $files > $logfile >2&1"); if i take out the > $logfile >2&1 , it works fine but i get that error with it in, but the werid thing is it did

Re: system function wont redirect output

2003-09-07 Thread Steve
ahhh nevermind it was a typo.. i hade >2&1 shoulda been 2>&1 , dont know how that got changed and how i didnt notice it sorry heh ;p On Sun, 2003-09-07 at 06:24, Steve wrote: > hey, in my program im just trying to redirect the commands output but i > get the error: > sh: line 1: 1: command not fou

running progs through another script

2003-09-07 Thread sc00170
Is there an function that not suspends the current prog running when executes another script? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: eval and __LINE__

2003-09-07 Thread Rob Dixon
Hacksaw wrote: > > I want to have something like die, but for the web, so I want it > to print out the error with a at the end, etc. > > How the F### do I get __LINE__ to be evaluated, not where it is in > the program file, but where the function is called? > > Another way of asking this is, how

Re: Does Regex help in this case ?

2003-09-07 Thread Li Ngok Lam
Thanks John, and Rob. This reply is quite close to what I am going to do, but some critical point is wanted here I'll try to explain my question further > > > That's about the whole story, but I'll make it short. > > For example, I have a list like this : > > > > 123ABCDEF456 > > 123456

DBI Query rows Benchmark

2003-09-07 Thread Pablo Fischer
Hello! I have a questionto those lovers of DBI and Databases: which method is faster to know the number of rows of a query: $sth->rows or my query but with a COUNT(id) and retrieve the value with: $query->bind_columns(undef, \$total); The table its 'big' cause it will manage like 12,000 row

Re: eval and __LINE__

2003-09-07 Thread Hacksaw
> use CGI::Carp 'fatalsToBrowser' Ooo, cool. Thanks. Wow, two useful answers. I like this list. -- Commitments are to be honoured. http://www.hacksaw.org -- http://www.privatecircus.com -- KB1FVD -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: grep with ftp

2003-09-07 Thread R. Joseph Newton
Bob Showalter wrote: > Johnson, Shaunn wrote: > > Howdy: > > > > I'm looking for information that will let me > > open an ftp connection and grep / search > > for files and then FTP them back to me. > > What do you mean "grep/search" for files? If you want to search for > particular file *names*,

Re: Does Regex help in this case ?

2003-09-07 Thread John W. Krahn
Li Ngok Lam wrote: > > Thanks John, and Rob. > > This reply is quite close to what I am going to do, > but some critical point is wanted here I'll try to explain > my question further > > It does, and thaz about my coding currently up to. > > > #!/usr/bin/perl > > use warnings; > >

Re: DBI Query rows Benchmark

2003-09-07 Thread Bob Showalter
Pablo Fischer wrote: > Hello! > > I have a questionto those lovers of DBI and Databases: which method > is faster to know the number of rows of a query: > > $sth->rows > > or > > my query but with a COUNT(id) and retrieve the value with: > > $query->bind_columns(undef, \$total); > > The table its '

Re: running progs through another script

2003-09-07 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > Is there an function that not suspends the current prog running when > executes another script? You need two functions for that: fork() and exec() See: perldoc -q "How do I start a process in the background?" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

Re: Re : Installing CPAN Perl Modules with Activestate Perl 5. v5.8

2003-09-07 Thread R. Joseph Newton
Derek Byrne wrote: > Hi, > In the process of trying to get perl modules installed, I downloaded over > 300 Activestate specific perl modules and they work fine (of the ones I've > used). > Now, I've read somewhere that the perl modules which are located on CPAN > are not directly compatible wi

Re: Does Regex help in this case ?

2003-09-07 Thread R. Joseph Newton
Li Ngok Lam wrote: > Hi all, > > That's about the whole story, but I'll make it short. > For example, I have a list like this : > > 123ABCDEF456 > 123456 > 654WXYZ321 > 987654321 > ABCDEF123456 > WXYZ321 > > By user's INTEGER Please don't do this. The word "integer" is not being used as a global

Re: Use of uninitialized value in concatenation (.) or string at...

2003-09-07 Thread R. Joseph Newton
Please do not cross-post. I know already that I am going to be burned with at least two failure notices by responding to your post before checking for rudeness. Since I am not subscribed to either of the other lists you *spammed*, my replies will be returned with either failure or "Awaiting ap

Re: Getopt module

2003-09-07 Thread R. Joseph Newton
deb wrote: > Hi, > > Here's some (unfinished) code I am trying to use with Getopt::Std, > > #!/usr/local/bin/perl -w > # > use Getopt::Std; > use diagnostics; Ooops! You started your executable code without use strict; > [snipped--No point in even scanning it without first letting the error-c

Re: Extracting equal entities from two different sized arrays?

2003-09-07 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, John W. Krahn wrote: > Freddy söderlund wrote: >> >> Let me re-phrase my question a bit: >> >> I want to compare the two strings and I want to extract those chars that >> are matching each other in the first and second string (in order from the >> beginning), and

Re: eval and __LINE__

2003-09-07 Thread Randal L. Schwartz
> "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes: Rob> use CGI::Carp 'fatalsToBrowser' Just remember NEVER to leave that on in production code. EVER. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/> Perl/

Re: DBI Query rows Benchmark

2003-09-07 Thread Pablo Fischer
Thanks!!! El día Sunday 07 September 2003 7:59 a Bob Showalter mandó el siguiente correo: > Pablo Fischer wrote: > > Hello! > > > > I have a questionto those lovers of DBI and Databases: which method > > is faster to know the number of rows of a query: > > > > $sth->rows > > > > or > > > > my quer

Re: DBI Query rows Benchmark

2003-09-07 Thread George Schlossnagle
On Sunday, September 7, 2003, at 12:33 PM, Pablo Fischer wrote: Thanks!!! El día Sunday 07 September 2003 7:59 a Bob Showalter mandó el siguiente correo: Pablo Fischer wrote: Hello! I have a questionto those lovers of DBI and Databases: which method is faster to know the number of rows of a quer

Re: Deleting a line that contains certain text

2003-09-07 Thread R. Joseph Newton
"John W. Krahn" wrote: > > Also, I would like to run this from within a script instead of from the > > command line. > > > > BTW...using PERL 5.8.0 on Windows2000 Pro > > Here is one way to do it: > > use warnings; > use strict; > > my $file = shift or die "usage: $0 filename\n"; > > rename $file,

Re: Deleting a line that contains certain text

2003-09-07 Thread John W. Krahn
"R. Joseph Newton" wrote: > > "John W. Krahn" wrote: > > > > rename $file, "$file.bak" or die "Cannot move $file to $file.bak: $!"; > > I would say that this is the wrong place for the rename. Computers do crash. > If a crash occurs while this program is in progress, then he is left with a > re

Re: Extracting equal entities from two different sized arrays?

2003-09-07 Thread John W. Krahn
Kevin Pfeiffer wrote: > > In article <[EMAIL PROTECTED]>, John W. Krahn wrote: > > > my $string1 = 'C:\Program files\directory1\directory2\directory3'; > > my $string2 = 'C:\Program files\directory1\dir2\dir3'; > > > > ( my $nulls = $string1 ^ $string2 ) =~ s/^(\0+).*/$1/s; > > > > ( my $string3

Re: Enumerating list of IP Addresses from a given range

2003-09-07 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, John W. Krahn wrote: > Brian Burns wrote: >> >> given a start and finish address like this >> >> $start_address = "10.11.1.14:; >> $finish_address = "12.13.2.3"; >> >> I need to output generarate a a sequential list of addresses like the >> following: >> >> 10.

Re: Enumerating list of IP Addresses from a given range

2003-09-07 Thread John W. Krahn
Kevin Pfeiffer wrote: > > In article <[EMAIL PROTECTED]>, John W. Krahn wrote: > > > You need to convert the IP address to a 32 bit integer and back again. > > > > use Socket; > > > > my $start_address = unpack 'N', inet_aton( '10.11.1.14' ); > > my $finish_address = unpack 'N', inet_aton( '12.1

Re: Enumerating list of IP Addresses from a given range

2003-09-07 Thread John W. Krahn
Kevin Pfeiffer wrote: > > Here's my less clever (and slower?) method... > > my @start_addr = split /\./, $start_address; > my @finish_addr = split /\./, $finish_address; > my @result = @start_addr; > > print join ".", @result, "\n"; # first number > > while (1) { > $result[3]++;

Re: linux - install bundle::cpan

2003-09-07 Thread Todd W.
"Paul Kraus" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am trying to install Bundle::CPAN and i seem stuck in this loop. Any > suggestions? outut of command issued below. > > Paul Kraus > > using perl -MCPAN -e shell as root. > > this is the output... > Bundle summary: The fol

Re: eval and __LINE__

2003-09-07 Thread Hacksaw
> Rob> use CGI::Carp 'fatalsToBrowser' > > Just remember NEVER to leave that on in production code. EVER. Okay, I'll bite. Why? Obviously it'd look bad, but your reaction seems stronger than that. -- The creative impulse animates whatever instrument is placed at its disposal. http://www.hack

Re: linux - install bundle::cpan

2003-09-07 Thread Bruce Ferrell
if you have cpan set-up with UNINSTALL=1 the older file will be detected and replaced in toto by the new one Todd W. wrote: "Paul Kraus" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I am trying to install Bundle::CPAN and i seem stuck in this loop. Any suggestions? outut of command

Re: eval and __LINE__

2003-09-07 Thread Randal L. Schwartz
> "Hacksaw" == Hacksaw <[EMAIL PROTECTED]> writes: Hacksaw> Okay, I'll bite. Why? Obviously it'd look bad, but your reaction seems Hacksaw> stronger than that. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777

Re: Use of uninitialized value in concatenation (.) or string at...

2003-09-07 Thread Carl Jolley
On Sat, 6 Sep 2003, Devon Young wrote: > What does this mean?? I'm thoroughly puzzled and I've been scouring the net > for an answer. I've been assuming it means I'm not putting strings together > correctly, but I can't figure out how to fix it. Here's the errors I'm > getting, followed by the pei

Re: Use of uninitialized value in concatenation (.) or string at...

2003-09-07 Thread R. Joseph Newton
Devon Young wrote: > What does this mean?? I'm thoroughly puzzled and I've been scouring the net > for an answer. I've been assuming it means I'm not putting strings together > correctly, but I can't figure out how to fix it. Here's the errors I'm > getting, followed by the peice of code that the