Re: CGI Help

2007-08-22 Thread Gunnar Hjalmarsson
Tony Heal wrote: I want to run a cgi script from another server inside a local cgi page A quick and dirty example: #!/usr/bin/perl -T use strict; use warnings; use LWP::Simple; my ($content, $style) = getpage(); print HTML; Content-type: text/html; charset=ISO-8859-1 html head$style/head

Re: regexp /g question

2007-08-22 Thread Chas Owens
On 8/22/07, Alexandru Maximciuc [EMAIL PROTECTED] wrote: Hello, could someone please explain me these results: snip print 1) .scalar($_ =~ /$re/g).\n; my @a = $_ =~ /$re/g; print 1) .scalar(@a).\n; snip 1) 1 1) 12 snip The issue is scalar vs list context and its effect on the g option. In

Re: perl include dependencies?

2007-08-22 Thread Xavier Noria
On Aug 21, 2007, at 3:37 PM, infobank wrote: I'm trying to embed djabberd (perl5 net-im) onto a m0n0wall base (FreeBSD). I found scandeps, and ran it on DJAbberd and found some useful information about the modules it relies upon. Is there any way to find out which files it relies upon? You

Re[2]: regexp /g question

2007-08-22 Thread Alexandru Maximciuc
Hello Chas, Wednesday, August 22, 2007, 10:21:01 AM, you wrote: On 8/22/07, Alexandru Maximciuc [EMAIL PROTECTED] wrote: Hello, could someone please explain me these results: snip print 1) .scalar($_ =~ /$re/g).\n; my @a = $_ =~ /$re/g; print 1) .scalar(@a).\n; snip 1) 1 1) 12 snip

connecting to Oracle

2007-08-22 Thread Octavian Rasnita
Hi, I want to make a program that connects to a remote Oracle database and then make it a .exe Windows executable. Is it possible to make it not depend on Oracle's client? Thanks. Octavian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

question about Image::Magick

2007-08-22 Thread qilin
I am trying to Annotate a string on an image with Image::Magick question 1: how can i center the string shown on that image ? question 2: how can i get the real image size of this string only which is shown on parent image? not sure if i address my questions clearly.. but please help. --

Re: regex help

2007-08-22 Thread Mumia W..
On 08/21/2007 07:41 AM, Tony Heal wrote: the list is a list of files by version. I need to keep the last 5 versions. Jeff's code works fine except I am getting some empty strings at the beginning that I have not figured out. Here is what I have so far. Lines 34 and 39 are provide a print out

Re: Syntax error?

2007-08-22 Thread [EMAIL PROTECTED]
On Aug 22, 5:44 am, [EMAIL PROTECTED] (Chris) wrote: my @gilligan = qw(red_shirt hat lucky_socks water_bottle); my @skipper = qw(blue_shirt hat jacket preserver sunscreen); my @professor = qw(sunscreen water_bottle slide_rule batteries radio); my %all = ( Gilligan = [EMAIL

Re: Syntax error?

2007-08-22 Thread [EMAIL PROTECTED]
On Aug 22, 5:44 am, [EMAIL PROTECTED] (Chris) wrote: I am working a script that is a solution to a problem in Intermediate Perl. Here is the script: #!/usr/bin/perl -w use strict; sub check_items_for_all { my $all_ref = @_; my @who = keys %$all_ref; my @required

Re: Syntax error?

2007-08-22 Thread Mr. Shawn H. Corey
Chris wrote: I am working a script that is a solution to a problem in Intermediate Perl. Here is the script: #!/usr/bin/perl -w use strict; sub check_items_for_all { my $all_ref = @_; my $all_ref = shift @_; my @who = keys %$all_ref; my @required = qw(preserver

I need and explanation for this.

2007-08-22 Thread jinto12
Ok im just starting to learn perl. what im basically doing is asking the user for a couple of inputs and then appending in it to a file. but when write them to a file, it writes each input in one line and the next input in the next line, so isnt it supposed to added in a single line? and how can i

Re: I need and explanation for this.

2007-08-22 Thread Jeff Pang
-Original Message- From: jinto12 [EMAIL PROTECTED] Sent: Aug 22, 2007 3:24 PM To: beginners@perl.org Subject: I need and explanation for this. Ok im just starting to learn perl. what im basically doing is asking the user for a couple of inputs and then appending in it to a file. but

Re: Syntax error?

2007-08-22 Thread Paul Lalli
On Aug 22, 12:44 am, [EMAIL PROTECTED] (Chris) wrote: #!/usr/bin/perl -w use strict; sub check_items_for_all { my $all_ref = @_; This assigns $all_ref to be the number of items in @_. I don't think that's what you want. You are passing a reference to a hash as the first argument.

Re: Syntax error?

2007-08-22 Thread Paul Lalli
On Aug 22, 12:50 am, [EMAIL PROTECTED] (Yitzle) wrote: http://perldoc.perl.org/functions/grep.html Good advice. Irrelevant to the problem at hand, but good advice nonetheless. Without testing the code or anything, could it be that: unless (grep $item eq $_, %$all_ref{$crew}) { should be:

Re: Syntax error?

2007-08-22 Thread Paul Lalli
On Aug 22, 1:18 am, [EMAIL PROTECTED] (Alexandru Maximciuc) wrote: Wednesday, August 22, 2007, 7:44:02 AM, you wrote: unless (grep $item eq $_, %$all_ref{$crew}) { this does the job well (I think :) ) unless (grep $item eq $_, $all_ref-{$crew}) { No.

Re: I need and explanation for this.

2007-08-22 Thread Paul Lalli
On Aug 22, 8:04 am, [EMAIL PROTECTED] (Jeff Pang) wrote: 1) you need a chomp to strip the newline symbol,so it should be, $x=STDIN;chomp $x; $y=STDIN;chomp $y; Or, more conventionally: chomp (my $x = STDIN); chomp (my $y = STDIN); 2) Perl use '.' for strings connection,not '+'.So you need,

Re: question about Image::Magick

2007-08-22 Thread Gunnar Hjalmarsson
qilin wrote: I am trying to Annotate a string on an image with Image::Magick question 1: how can i center the string shown on that image ? question 2: how can i get the real image size of this string only which is shown on parent image? Where have you looked so far to try figuring it out?

Perl for hardware driver

2007-08-22 Thread Solidzh
Hello, My boss asked me to learn some Java but I said Perl can do anything that Java can do.So he asked me to write a driver for his wireless network card on Linux with Perl.I'm faint but,is there a way to do this? Thanks helps. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: perl include dependencies?

2007-08-22 Thread Peter Scott
On Tue, 21 Aug 2007 06:37:15 -0700, infobank wrote: I'm trying to embed djabberd (perl5 net-im) onto a m0n0wall base (FreeBSD). I found scandeps, and ran it on DJAbberd and found some useful information about the modules it relies upon. Is there any way to find out which files it relies

Re: I need and explanation for this.

2007-08-22 Thread Chas Owens
On 8/22/07, Paul Lalli [EMAIL PROTECTED] wrote: On Aug 22, 8:04 am, [EMAIL PROTECTED] (Jeff Pang) wrote: 1) you need a chomp to strip the newline symbol,so it should be, $x=STDIN;chomp $x; $y=STDIN;chomp $y; Or, more conventionally: chomp (my $x = STDIN); chomp (my $y = STDIN); 2)

Re: Perl for hardware driver

2007-08-22 Thread yitzle
On 8/22/07, Solidzh [EMAIL PROTECTED] wrote: Hello, My boss asked me to learn some Java but I said Perl can do anything that Java can do.So he asked me to write a driver for his wireless network card on Linux with Perl.I'm faint but,is there a way to do this? Thanks helps. I may be

Re: Perl for hardware driver

2007-08-22 Thread Chas Owens
On 8/22/07, Solidzh [EMAIL PROTECTED] wrote: Hello, My boss asked me to learn some Java but I said Perl can do anything that Java can do.So he asked me to write a driver for his wireless network card on Linux with Perl.I'm faint but,is there a way to do this? Thanks helps. Yes, and it is

Re: Syntax error?

2007-08-22 Thread [EMAIL PROTECTED]
On Aug 22, 6:18 am, [EMAIL PROTECTED] (Alexandru Maximciuc) wrote: Hello Chris, Wednesday, August 22, 2007, 7:44:02 AM, you wrote: I am working a script that is a solution to a problem in Intermediate Perl. Here is the script: #!/usr/bin/perl -w use strict; sub check_items_for_all {

Re[2]: Syntax error?

2007-08-22 Thread Alexandru Maximciuc
Hello Paul, Wednesday, August 22, 2007, 3:21:06 PM, you wrote: On Aug 22, 1:18 am, [EMAIL PROTECTED] (Alexandru Maximciuc) wrote: Wednesday, August 22, 2007, 7:44:02 AM, you wrote: unless (grep $item eq $_, %$all_ref{$crew}) { this does the job well (I think )

Re: Perl for hardware driver

2007-08-22 Thread Chas Owens
On 8/22/07, yitzle [EMAIL PROTECTED] wrote: On 8/22/07, Solidzh [EMAIL PROTECTED] wrote: Hello, My boss asked me to learn some Java but I said Perl can do anything that Java can do.So he asked me to write a driver for his wireless network card on Linux with Perl.I'm faint but,is there a

Re: connecting to Oracle

2007-08-22 Thread Chas Owens
On 8/22/07, Octavian Rasnita [EMAIL PROTECTED] wrote: Hi, I want to make a program that connects to a remote Oracle database and then make it a .exe Windows executable. Is it possible to make it not depend on Oracle's client? Thanks. Octavian Yes, but it would be a lot of work, slow,

File Creator under WIN32 environment

2007-08-22 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Need to get the individual who created the file I am looking at. I am using File::Find to get all files that are 4 days or younger. I can get all info: Path, file name, file size, date modified easily except owner. I have looked at the Perl doc ( using AS 5.8.8 build 820 ). I see that I

Re: File Creator under WIN32 environment

2007-08-22 Thread yitzle
I have no idea how file ownership works under Windows, but the built in Perl command 'stat' [1] returns the numeric user ID of file's owner. Don't know if this helps you at all... [1] http://perldoc.perl.org/functions/stat.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: File Creator under WIN32 environment

2007-08-22 Thread Paul Lalli
On Aug 22, 1:01 pm, [EMAIL PROTECTED] (Yitzle) wrote: I have no idea how file ownership works under Windows, but the built in Perl command 'stat' [1] returns the numeric user ID of file's owner. Don't know if this helps you at all... It doesn't. Under Win32, uid and gid are both 0. Paul

Re: File Creator under WIN32 environment

2007-08-22 Thread Gunnar Hjalmarsson
Wagner, David --- Senior Programmer Analyst --- WGO wrote: Any insights would be greatly appreciated on getting owner of a file under Win32. There is a Win32::File module with a GetAttributes() function. Sounds promising, doesn't it? However, reading the docs for that module makes

Re: File Creator under WIN32 environment

2007-08-22 Thread yitzle
On 8/22/07, Gunnar Hjalmarsson [EMAIL PROTECTED] wrote: Wagner, David --- Senior Programmer Analyst --- WGO wrote: Any insights would be greatly appreciated on getting owner of a file under Win32. There is a Win32::File module with a GetAttributes() function. Sounds promising,

Re: File Creator under WIN32 environment

2007-08-22 Thread Paul Lalli
On Aug 22, 2:11 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: Wagner, David --- Senior Programmer Analyst --- WGO wrote: Any insights would be greatly appreciated on getting owner of a file under Win32. There is a Win32::File module with a GetAttributes() function. Sounds

Re: File Creator under WIN32 environment

2007-08-22 Thread Chas Owens
On 8/22/07, Gunnar Hjalmarsson [EMAIL PROTECTED] wrote: Wagner, David --- Senior Programmer Analyst --- WGO wrote: Any insights would be greatly appreciated on getting owner of a file under Win32. There is a Win32::File module with a GetAttributes() function. Sounds promising,

RE: File Creator under WIN32 environment

2007-08-22 Thread Bob McConnell
-Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 3:14 PM To: Gunnar Hjalmarsson Cc: beginners@perl.org Subject: Re: File Creator under WIN32 environment On 8/22/07, Gunnar Hjalmarsson [EMAIL PROTECTED] wrote: Wagner, David ---

Re: File Creator under WIN32 environment

2007-08-22 Thread Chas Owens
On 8/22/07, Bob McConnell [EMAIL PROTECTED] wrote: snip use constant READ_ONLY = 1; use constant ARCHIVED = 2; use constant HIDDEN = 4; I believe the fourth flag is SYSTEM. Is there a value for that? snip Those flags and their values were made up on the spot; any relation between them and

Help on cleanining strings

2007-08-22 Thread Mário Gamito
Hi, Sorry for the newbie question, but I've searche over the web and couldn' find an answer to what I need. I need to clean all the ocorrences of the ##Z/ string (without the quotes), from a series of .html files located in a single directory. Can someone help me, please ? Any help would

Re: perl include dependencies?

2007-08-22 Thread infobank
I'm trying to embed djabberd (perl5 net-im) onto a m0n0wall base (FreeBSD). I found scandeps, and ran it on DJAbberd and found some useful information about the modules it relies upon. Is there any way to find out which files it relies upon? You mean the files corresponding to those

Re: I need and explanation for this.

2007-08-22 Thread jinto12
thanks this helps a lot. On Aug 22, 7:11 am, [EMAIL PROTECTED] (Chas Owens) wrote: On 8/22/07, Paul Lalli [EMAIL PROTECTED] wrote: On Aug 22, 8:04 am, [EMAIL PROTECTED] (Jeff Pang) wrote: 1) you need a chomp to strip the newline symbol,so it should be, $x=STDIN;chomp $x;

Help on cleaning strings

2007-08-22 Thread Mário Gamito
Hi, Sorry for the newbie question, but I've searche over the web and couldn' find an answer to what I need. I need to clean all the ocorrences of the ##Z/ string (without the quotes), from a series of .html files located in a single directory. Can someone help me, please ? Any help would

Re: Help on cleaning strings

2007-08-22 Thread Chas Owens
On 8/22/07, Mário Gamito [EMAIL PROTECTED] wrote: Hi, Sorry for the newbie question, but I've searche over the web and couldn' find an answer to what I need. I need to clean all the ocorrences of the ##Z/ string (without the quotes), from a series of .html files located in a single

Re: Help on cleaning strings

2007-08-22 Thread John W. Krahn
Mário Gamito wrote: Hi, Hello, Sorry for the newbie question, but I've searche over the web and couldn' find an answer to what I need. I need to clean all the ocorrences of the ##Z/ string (without the quotes), from a series of .html files located in a single directory. perl -i

Re: perl include dependencies?

2007-08-22 Thread Chas Owens
On 8/22/07, infobank [EMAIL PROTECTED] wrote: I'm trying to embed djabberd (perl5 net-im) onto a m0n0wall base (FreeBSD). I found scandeps, and ran it on DJAbberd and found some useful information about the modules it relies upon. Is there any way to find out which files it relies

If anyone doesn't mind helping me optimize this code...

2007-08-22 Thread eselk
I'm a C/C++ programmer, with a perl script I'm trying to optimize. I don't know enough about perl syntax and string/buffer handling functions to feel comfortable doing this on my own. I imagine adding some 'regular expressions' would be ideal, in place of my while() loop. If anyone wouldn't

Re: If anyone doesn't mind helping me optimize this code...

2007-08-22 Thread Mr. Shawn H. Corey
[EMAIL PROTECTED] wrote: $hostname is set to whatever I need to inject by some code above this part, and $search is the data I need to replace with $hostname (they are always the same length, so it never changes the size of the downloaded file). The loop at the end is what I imagine needs to be

Re: Help on cleanining strings

2007-08-22 Thread Rodrick Brown
On 8/22/07, Mário Gamito [EMAIL PROTECTED] wrote: Hi, Sorry for the newbie question, but I've searche over the web and couldn' find an answer to what I need. I need to clean all the ocorrences of the ##Z/ string (without the quotes), from a series of .html files located in a single

Re: If anyone doesn't mind helping me optimize this code...

2007-08-22 Thread John W. Krahn
[EMAIL PROTECTED] wrote: I'm a C/C++ programmer, with a perl script I'm trying to optimize. I don't know enough about perl syntax and string/buffer handling functions to feel comfortable doing this on my own. Perl's open()/read() functions are equivalent to C's fopen()/fread() and so the IO