Substition string in a variable?

2010-02-24 Thread HACKER Nora
Hi, I want to apply a certain substition to a string, whereas the whole substitution is defined in a variable in another script. Unfortunately, it doesn't work as wanted :-( Looks like this: sub.conf: $sub='s/db$//g'; script.pl: do sub.conf; print Please enter string: ; # e.g. mydb

Re: Substition string in a variable?

2010-02-24 Thread Shlomi Fish
Hi Nora! Welcome to Perl. On Wednesday 24 Feb 2010 11:00:46 HACKER Nora wrote: Hi, I want to apply a certain substition to a string, whereas the whole substitution is defined in a variable in another script. Unfortunately, it doesn't work as wanted :-( Looks like this: sub.conf:

AW: Substition string in a variable?

2010-02-24 Thread HACKER Nora
Hi Shlomi, Thanks for your reply. Please add use strict; and use warnings; to your code. Done. Phew, there was a whole lot of warnings/errors to be fixed :-/ Why are you using do instead of use or require? Because I didn't know better :) Changed it to require since this is some kind of

Inserting a pause into a loop

2010-02-24 Thread Erik Lewis
Hi, I'm writing a perl script thats goal is to read a delimited file containing a userid and an address to google maps where the address is converted into latitude and longitude. The problem I'm having is with the result I'm printing. Each line is unique via the userid when its printed but

Re: Substition string in a variable?

2010-02-24 Thread Erez Schatz
On 24 February 2010 15:03, HACKER Nora nora.hac...@stgkk.at wrote: Normally ARGV - shortened to is preferable over STDIN; I initially used this syntax but received an error because I start my script with 1-2 parameters (one required, second one optional):

Re: Get the page from a server that uses DotNet

2010-02-24 Thread haliphax
On Sat, Feb 20, 2010 at 6:24 PM, Uri Guttman u...@stemsystems.com wrote: IP == Ion Pop ionpop...@gmail.com writes: IP There is a page which is created using DotNet and there is a IP paginated table in it. I want to download the next pages from IP that table, but the links to those pages

Re: Inserting a pause into a loop

2010-02-24 Thread John W. Krahn
Erik Lewis wrote: Hi, Hello, I'm writing a perl script thats goal is to read a delimited file containing a userid and an address to google maps where the address is converted into latitude and longitude. The problem I'm having is with the result I'm printing. Each line is unique via the

Re: Inserting a pause into a loop

2010-02-24 Thread Erik Lewis
Wow, thank you for your assistance. I was working on the assumption that I got something correct in an earlier script, that was incorrect. I've got some more work to do but your explanation helped me understand where I went wrong. On Feb 24, 2010, at 12:38 PM, John W. Krahn wrote: Erik

How to print HTML documents from perl script?

2010-02-24 Thread boll
Hello- I am hoping there is a way to print HTML documents from a perl script. #!/usr/bin/perl -w use strict; use warnings; print Content-Type: text/html\n\n; open HTML, table_one.html or die $!; while( HTML ) { print; } close HTML; This displays the HTML code in

Re: How to print HTML documents from perl script?

2010-02-24 Thread Shawn H Corey
boll wrote: This displays the HTML code in the terminal window, but I need to produce the rendered page on a printer. Is there a module that will create printable HTML, or maybe a system or exec command that will print the documents? These are plain HTML tables, so I don't need beautiful

Re: How to print HTML documents from perl script?

2010-02-24 Thread Jim Gibson
On 2/24/10 Wed Feb 24, 2010 11:49 AM, boll b...@sonic.net scribbled: Hello- I am hoping there is a way to print HTML documents from a perl script. #!/usr/bin/perl -w use strict; use warnings; print Content-Type: text/html\n\n; open HTML, table_one.html or die $!;

Re: How to print HTML documents from perl script?

2010-02-24 Thread boll
Jim Gibson wrote: On 2/24/10 Wed Feb 24, 2010 11:49 AM, boll b...@sonic.net scribbled: Hello- I am hoping there is a way to print HTML documents from a perl script. #!/usr/bin/perl -w use strict; use warnings; print Content-Type: text/html\n\n; open HTML,

Math::GMP

2010-02-24 Thread Dave Tang
Dear list, I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module. I have installed a GMP library (required for Math::GMP) but when I try to install Math::GMP I get an error. Here's the transcript. May someone shed some light? perl Makefile.PL Checking if your kit is

Re: anonymous hash slices

2010-02-24 Thread Uri Guttman
BRH == Bryan R Harris bryan_r_har...@raytheon.com writes: BRH Just as an academic exercise, I thought I should be able to do this: BRH ** BRH @a=(l=35,k=31,r=7,k=6); BRH @r=qw/l r r k/; try to use some white space in your code. even in short examples

AW: Substition string in a variable?

2010-02-24 Thread HACKER Nora
Hi Erez, STDIN suggest dynamic input from the user during runtime. While @ARGV/ARGV/ refers to commandline arguments sent before running the program. If you iterate over them using the idiomatic while(){} loop, you'll have a better way of making sure you only run over the values that were

Re: Math::GMP

2010-02-24 Thread Shlomi Fish
Hi Dave! On Thursday 25 Feb 2010 08:14:11 Dave Tang wrote: Dear list, I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module. I have installed a GMP library (required for Math::GMP) but when I try to install Math::GMP I get an error. Here's the transcript. May someone shed