Using a CSS file

2004-12-08 Thread Graeme St. Clair
I have code like this in a Windows XP sys, w. Apache 1.3.27 and Perl 5.6.1:- $formData = new CGI(); print $formData-header( -expires= 'now'); print $formData-start_html( -title = $title, # -style = { 'src' = 'blah.css' },

Re: Using a CSS file

2004-12-08 Thread David Dorward
On Wed, Dec 08, 2004 at 07:47:09AM -0800, Graeme St. Clair wrote: [Wed Dec 08 10:30:01 2004] [error] [client ###.###.###.###] c:/program files/perl_apache/apache/cgi-bin/fred/blah.css is not executable; ensure interpreted scripts have #! first line Looks like your server is configured to

Re: Using a CSS file

2004-12-08 Thread Sean Davis
On Dec 8, 2004, at 10:52 AM, David Dorward wrote: On Wed, Dec 08, 2004 at 07:47:09AM -0800, Graeme St. Clair wrote: [Wed Dec 08 10:30:01 2004] [error] [client ###.###.###.###] c:/program files/perl_apache/apache/cgi-bin/fred/blah.css is not executable; ensure interpreted scripts have #! first

Re: Using a CSS file

2004-12-08 Thread Lawrence Statton
2) 'blah.css' contains only the CSS specs, nothing else. Is that as it should be? Yes Well -- or not :) Just as we can use Perl to produce valid HTML, we can use Perl to produce valid CSS. I use it often to produce dynamic CSS based on User-Agent to work around gross deficiencies in

RE: Using a CSS file

2004-12-08 Thread Graeme St. Clair
David Sean: the hints about cgi-bin and htdocs (plus my own unfollowed-up attempt at 'src' = '../blah.css' were enough. I simply moved blah.css to htdocs, and bingo. Lawrence: you seem to be suggesting something close to my $css approach, but as I have a couple of other pages to bring into

Setting a Cookie...

2004-12-08 Thread Bill Stephenson
How can I set a cookie when someone visits my home page? I've tried using a server side include like so # code # #!/usr/bin/perl -w # This is in my html page: # !--#exec cgi=/cgi-bin/ezInvoice2/ssi.cgi-- use strict; use CGI qw/:standard/; use

Re: Setting a Cookie...

2004-12-08 Thread Bill Stephenson
I apologize, the code I sent previously does create an error, this code does not... # code #!/usr/bin/perl -w use strict; use CGI qw/:standard/; use CGI::Carp('fatalsToBrowser'); my $Q = new CGI; my $demo_uses; $demo_uses = $Q-cookie('demo_tracker'); if

RE: Setting a Cookie...

2004-12-08 Thread Bob Showalter
Bill Stephenson wrote: How can I set a cookie when someone visits my home page? I've tried using a server side include like so # code # #!/usr/bin/perl -w # This is in my html page: # !--#exec cgi=/cgi-bin/ezInvoice2/ssi.cgi-- [snip

Google Ads: Was: Setting a Cookie...

2004-12-08 Thread Bill Stephenson
Thanks for the pointer Bob, I read a few of the Google links you pointed out and now understand why this cannot be done. I guess I'll have to work a little bit around this one. I found that I can set/read/manipulate a cookie with JavaScript, (GoLive has some tools for this) but I haven't tested

Re: ip4 check

2004-12-08 Thread Ing. Branislav Gerzo
[EMAIL PROTECTED] [D], on Tuesday, December 7, 2004 at 11:49 (-0500) thinks about: D Did anyone have any ideas I only received one response! Thanks what was bad on my response ? Maybe you wanted whole code...here it is: use IO::Socket; my $ip = '192.168.1.1'; $ip_ok = inet_aton($ip) ||

find and replace all occurance of the string from a list of files

2004-12-08 Thread Chandrakant Reddy
Hi I want to replace all occurances of 'and' with '' in all the given files inputfile.txt containts all the names of the files to process. i wrote a small shell script for this for i in `cat inputfile.txt` do cp $i ${i}.bk sed -e 's/ and / /g' ${i}.bk

Re: find and replace all occurance of the string from a list of files

2004-12-08 Thread Tor Hildrum
On Wed, 8 Dec 2004 15:22:39 +0530, Chandrakant Reddy [EMAIL PROTECTED] wrote: Hi I want to replace all occurances of 'and' with '' in all the given files In-place with backup in filename.bk: perl -pi'*.bk' -e 's/\band\b//g' filenames Here the problem is the files are owned by

array statistic (different)

2004-12-08 Thread Ing. Branislav Gerzo
Hello, I have one question - I know how to do this, but maybe someone shows me, how to do it better (for sure!). Ok, here we comes: I have: my @array = ( '1/2/1', '1/2/2', '1/4/2', '2/1/1', '2/1/1', '3/1/1' ); and now the

RE: XML::RSS::Parser - ns_qualify failure

2004-12-08 Thread Bob Showalter
Craig Moynes wrote: I installed XML::RSS:Parser from CPAN. When I try to run a simple script I get (from the sample code): Can't locate object method ns_qualify via package XML::RSS::Parser at testrss3.pl line 11 (#1) (F) You called a method correctly, and it correctly indicated a

Re: array statistic (different)

2004-12-08 Thread Ing. Branislav Gerzo
Ing. Branislav Gerzo [IBG], on Wednesday, December 8, 2004 at 13:03 (+0100) wrote: IBG I think this is nice example for recursive function, do you agree ? I agree too :) IBG Ok, I am code that, so I am looking for your suggestions, too :) Ok, here is my solution, not the best one, because it

Re: array statistic (different)

2004-12-08 Thread Ing. Branislav Gerzo
Ing. Branislav Gerzo [IBG], on Wednesday, December 8, 2004 at 14:28 (+0100) wrote these comments: IBG Ok, here is my solution, not the best one, because it return random IBG value if max is not exactly defined (we ends with the same values for IBG strings) ok, if anyone interested - I change it

Re: I am looking for a free perl compiler.

2004-12-08 Thread Edward WIJAYA
On Wed, 8 Dec 2004 12:56:15 +0800, Xun Yu [EMAIL PROTECTED] wrote: The problem is I can only get a evaluate license for PDK-Pro-6.0, so what I am looking for is a compiler more powerfull than perlcc, and must be free. I don't know if this is really what you want, but you can try to look at

Variables and MySQL

2004-12-08 Thread Dave Kettmann
Hi List, I have a script that takes input ( Formatted: +1## ). What it does with the input is read thru a database table and try to find a match. Here is an example to help clarify this: +--+--+ | alias| sendto

RE: array statistic (different)

2004-12-08 Thread Charles K. Clarkson
Ing. Branislav Gerzo [EMAIL PROTECTED] wrote: : I have: : : my @array = ( '1/2/1', : '1/2/2', : '1/4/2', : '2/1/1', : '2/1/1', : '3/1/1' ); What is it representative of? What is the application? Will there be only

Re: XML::RSS::Parser - ns_qualify failure

2004-12-08 Thread Craig Moynes
Bob, I have tried both lines: my $title = XML::RSS::Parser-ns_qualify('title',$feed-rss_namespace_uri); and my $title = $p-ns_qualify('title',$feed-rss_namespace_uri); I will try and make sure everything that is installed is up-to-date, then I will contact the author as my next step and then

Re: array statistic (different)

2004-12-08 Thread Ing. Branislav Gerzo
Charles K. Clarkson [CKC], on Wednesday, December 8, 2004 at 08:32 (-0600) thinks about: CKC What is it representative of? What is the application? CKC Will there be only didgits? What is the range of values CKC available. It will be not digits, I give bad example, I should use some words.

Re: I am looking for a free perl compiler.

2004-12-08 Thread JupiterHost.Net
I am looking for a free perl compiler. My /usr/bin/perl was free :) I suspect he wants something for Windows. By compiler, I further suspect that he wants something that will generate .exe files that can be run without a perl.exe on the system. If the usual line of thinking for this question

RE: Should be a simple substitution?

2004-12-08 Thread Bakken, Luke
And is this method any faster or more efficient than this? $var =~ s/\{([^}]+)\}/$v = $1; $v =~ s!,!|!g; qq!($v)!/ge; Why not find out yourself? C:\src\perltype rebench.plx use strict; use Benchmark qw/cmpthese/; sub luke { my $var = 'blargh{a,b,c}'; my $v; $var =~

RE: Should be a simple substitution?

2004-12-08 Thread Bakken, Luke
$var =~ s{([^}]+)}(?:@{[ ($a = $1) =~ y/,/|/ $a ]}); Does it not need the 'ge' at the end? I don't understand why you are creating an anonymous array with a single value, then dereferencing it... And what does the ?: do? I think the ?: must be extraneous: C:\src\perlperl

Re: Variables and MySQL

2004-12-08 Thread Lawrence Statton
Hi List, I have a script that takes input ( Formatted: +1## ). What it does wi th the input is read thru a database table and try to find a match. Here is a n example to help clarify this: Here is the cleaned up version of what you're doing -- since I don't have your database I'm

Re: Should be a simple substitution?

2004-12-08 Thread Dave Gray
I think the ?: must be extraneous: That construct lets the regex engine know that it doesn't need to worry about saving backreferences to the parenthesized group. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Variables and MySQL

2004-12-08 Thread Lawrence Statton
Aww, dangit --- I should have not used __TARGET__ as the replacement tag -- there is just too much room for confusion with reserved words like __PACKAGE__ or __LINE__ ... Everyone take out your erasers and change that to --TARGET-- please :) --L -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: Should be a simple substitution?

2004-12-08 Thread Bakken, Luke
I think the ?: must be extraneous: That construct lets the regex engine know that it doesn't need to worry about saving backreferences to the parenthesized group. It's on the right hand-side of the regex, however. Look at the output: C:\src\perlperl -pes{([^}]+)}(?:@{[ ($a = $1) =~ y/,/|/

Re: I am looking for a free perl compiler.

2004-12-08 Thread Jonathan Paton
*** Somewhat off-topic *** * Obfuscators don't work well enough to bother with. If you can't have people reading your code, don't use Perl, or better still, use Perl but don't allow access to the machine where the program runs (e.g. put up a web interface to a service under your control).

Help with cookies

2004-12-08 Thread Moon, John
Does anyone know if I should be able to write a cookie like : snip $secure{USER}=$user-{USER_ID}; $secure{LEVEL}=$REQUEST{LEVEL}; %{$secure{USER_CATEGORIES}}=%USER_CATEGORIES; %{$secure{USER_ACCOUNTS}}=%USER_ACCOUNTS; @[EMAIL PROTECTED]; my $my_cookie = $q-cookie(-name='TechDirect',

Term::ReadKey substitute for perl v5.8.0

2004-12-08 Thread Jason.Price
In trying to use Term::ReadKey, I've come across information indicating that Term::ReadKey does not work properly with Perl v5.8.0. We are running 5.8.0 on numerous systems, and upgrading them is not a trivial thing, due to business reasons. So, I need to find an alternative to some ReadKey

Re: Help with cookies

2004-12-08 Thread Jonathan Paton
Dear John, It is likely that you cannot store complex datastructures in cookies. (at least how the CGI module is currently written). You could try encoding the data to a string. Jonathan Paton -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Help with cookies

2004-12-08 Thread Moon, John
Dear John, It is likely that you cannot store complex datastructures in cookies. (at least how the CGI module is currently written). You could try encoding the data to a string. Jonathan Paton [jwm] Thank you for the Dear John letter ;-)... I was afraid that may be the answer I got... but

Re: I am looking for a free perl compiler.

2004-12-08 Thread Octavian Rasnita
So the conclusion is that perl code cannot be really hidden (for comercial purposes)? A license is equal to zero in some countries... so that's not a solution. Teddy - Original Message - From: Jonathan Paton [EMAIL PROTECTED] To: Chris Devers [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent:

Re: I am looking for a free perl compiler.

2004-12-08 Thread Chris Devers
On Wed, 8 Dec 2004, Octavian Rasnita wrote: So the conclusion is that perl code cannot be really hidden (for comercial purposes)? For any purposes, yes, code cannot be hidden. More broadly, for any interpreted language -- Perl, Python, Tcl, even ones like Java and Visual Basic -- it's

Re: Help with cookies

2004-12-08 Thread Lawrence Statton
Does anyone know if I should be able to write a cookie like : snip $secure{USER}=$user-{USER_ID}; $secure{LEVEL}=$REQUEST{LEVEL}; %{$secure{USER_CATEGORIES}}=%USER_CATEGORIES; %{$secure{USER_ACCOUNTS}}=%USER_ACCOUNTS; @[EMAIL PROTECTED]; my $my_cookie = $q-cookie(-name='TechDirect',

Re: I am looking for a free perl compiler.

2004-12-08 Thread Chris Devers
On Wed, 8 Dec 2004, Xun Yu wrote: I am going to compile a perl script to binary on linux That was worth mentioning up front! :-) I tried perlcc, I doesn't always works well. No, it doesn't. I tried the same script with perlapp from PDK-Pro-6.0 from ActiveState? It works. The problem

RE: Help with cookies

2004-12-08 Thread Bob Showalter
Moon, John wrote: Does anyone know if I should be able to write a cookie like : [ snip complex data structure ] You can do this if you serialize the complex structure into a scalar and then deserialize it when you read the cookie back. For an example of how to do this see the module

Re: I am looking for a free perl compiler.

2004-12-08 Thread Lawrence Statton
So the conclusion is that perl code cannot be really hidden (for comercial purposes)? A license is equal to zero in some countries... so that's not a solution. Well - never say, Never ... I think the output from perlcc is pretty inscrutable for any but the most dedicated attacker, and assume

Re: I am looking for a free perl compiler.

2004-12-08 Thread Tor Hildrum
On Wed, 8 Dec 2004 15:26:58 -0500 (EST), Chris Devers [EMAIL PROTECTED] wrote: On Wed, 8 Dec 2004, Octavian Rasnita wrote: So the conclusion is that perl code cannot be really hidden (for comercial purposes)? For any purposes, yes, code cannot be hidden. It can be hidden, but it will

Re: I am looking for a free perl compiler.

2004-12-08 Thread JupiterHost.Net
Lawrence Statton wrote: So the conclusion is that perl code cannot be really hidden (for comercial purposes)? A license is equal to zero in some countries... so that's not a solution. Well - never say, Never ... I think the output from perlcc is pretty inscrutable for any but the most dedicated

Re: Help with cookies

2004-12-08 Thread Lawrence Statton
Moon, John wrote: Does anyone know if I should be able to write a cookie like : [ snip complex data structure ] You can do this if you serialize the complex structure into a scalar and then deserialize it when you read the cookie back. For an example of how to do this see the

Re: I am looking for a free perl compiler.

2004-12-08 Thread Lawrence Statton
On Wed, 8 Dec 2004 15:26:58 -0500 (EST), Chris Devers [EMAIL PROTECTED] wro te: On Wed, 8 Dec 2004, Octavian Rasnita wrote: So the conclusion is that perl code cannot be really hidden (for comercial purposes)? For any purposes, yes, code cannot be hidden. It can be hidden, but

Re: I am looking for a free perl compiler.

2004-12-08 Thread JupiterHost.Net
Jonathan Paton wrote: I think it's *HIGHLY* ironic that the original poster is looking for a solution that allows him to close off his code, but demands that it be a freely distributable solution to his problem. My first reaction is: If you want to lock the door on your code (and I think that is

RE: Term::ReadKey substitute for perl v5.8.0

2004-12-08 Thread Jason.Price
Okay, I'm seeing mixed info on whether or not Term::ReadKey works properly with perl 5.8.0. So, maybe I'll just throw out some code, and see if others can get it to work. I'm trying to wrap the ReadKey call in an infinite loop, but it breaks as soon as I add the loop. Take away the loop, or

Re: Should be a simple substitution?

2004-12-08 Thread Dave Gray
It's on the right hand-side of the regex, however. Look at the output: C:\src\perlperl -pes{([^}]+)}(?:@{[ ($a = $1) =~ y/,/|/ $a ]}) blargh{a,b,c}blargh blargh(?:a|b|c)blargh The OP didn't want the ?: in there So it is! I'm usually a fan of one-liners, but I think this is a great

Re: Variables and MySQL

2004-12-08 Thread John W. Krahn
Dave Kettmann wrote: Hi List, Hello, I have a script that takes input ( Formatted: +1## ). What it does with the input is read thru a database table and try to find a match. Here is an example to help clarify this: +--+--+ | alias

Re: Term::ReadKey substitute for perl v5.8.0

2004-12-08 Thread Jonathan Paton
On Wed, 8 Dec 2004 16:06:49 -0600, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Okay, I'm seeing mixed info on whether or not Term::ReadKey works properly with perl 5.8.0. So, maybe I'll just throw out some code, and see if others can get it to work. I'm trying to wrap the ReadKey call in an

want to get the count of rows of a table from oracle database using perl script

2004-12-08 Thread Priyanka krishnaraj
Hi All I want to get the count of rows in paticular table of the oracle database. Should i write an sql script to conect to database? if so how didi retun the value to the perl script. please can anybody help me thank you pri __ Do You Yahoo!?