need sorting help

2002-03-22 Thread Adam Wesselink
Hi all I'm trying to update a script originally written by someone else (yeehaw), and I'm having troubles with the sorting routine. here's the code snippet. sub list_files { #($name, $type, $size, $mtime, $mode) = @$_; @sites = keys %das_sites; @sites = sort { lc($a) cmp lc($b) } @sites

RE: my first regex i think

2002-03-22 Thread Scot Robnett
Whoops, had to fix a comment here... if ($one =~ /$firstword/) { # searches the 1st column for 1st word print "Location: $firstlocation "; } elsif ($one =~ /$secondword/) { # searches **1st** column for 2nd word print "Location: $secondlocation "; } else { print ""; } -Origin

RE: my first regex i think

2002-03-22 Thread Scot Robnett
This is not the cleanest example, but hopefully it will get you going in the right direction #!/usr/bin/perl use strict; my $file = "/path/to/file"; # location of the file my $firstword = "foo"; # 1st search word my $firstlocation = "http://www.location1.com";; # 1st URL my $secondword = "bar

Re: my first regex i think

2002-03-22 Thread Michael Kelly
On 3/22/02 1:26 PM, Matthew Harrison <[EMAIL PROTECTED]> wrote: > if i have a file delimited by commas and i want to make a script that will > search to see if a word, passed in a query string, is in the file, and > redirect to one url if i does and one if it doesn't (both urls are also > passed

Sort of Conceptual, Syntax, and modules related questions

2002-03-22 Thread Connie Chan
Dear All, I have sort of questions, would you please give me some hint, even refering me to a perldoc would be nice too. 1. When I open a text file with *lines, however, I just want to read the first line, would this be a good idea ? open (FILE, "textfile.txt"); $firstline = ; close (FILE); w

my first regex i think

2002-03-22 Thread Matthew Harrison
if i have a file delimited by commas and i want to make a script that will search to see if a word, passed in a query string, is in the file, and redirect to one url if i does and one if it doesn't (both urls are also passed via query strings) thanks in advance -- Matthew Harrison Internet/N

RE: Perl DATABASE Forms

2002-03-22 Thread Scot Robnett
CGI::State might do some good also, although it's not going to compensate completely for a true stateful session. Scot R. -Original Message- From: Brice, Charles [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 12:48 PM To: 'David Kirol' (Receipt Notification Requested) (IPM Ret

RE: Perl DATABASE Forms

2002-03-22 Thread Brice, Charles
Hi David I am new to Perl. Our sys admin has Apache installed and is setting up for us to use Perl, DBI, CGI. Thanks for responding Charles -Original Message- From: David Kirol [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 1:40 PM To: Brice, Charles Subject: RE: Perl DATABASE

RE: Perl DATABASE Forms

2002-03-22 Thread Scot Robnett
You might try Programming the Perl DBI (O'Reilly) perldoc CGI.pm perldoc DBI.pm http://search.cpan.org/doc/JURL/DBD-ODBC-0.39/ODBC.pm http://search.cpan.org/doc/TIMB/DBD-Oracle-1.12/Oracle.pm http://www.mysql.com Scot Robnett inSite Internet

Perl DATABASE Forms

2002-03-22 Thread Brice, Charles
Hi all I work in an ORACLE Forms environment. The client is switching to Perl. Is it possible to create a complete data entry system for the Web using Perl? ORACLE Forms allows you to create multiple data entry blocks in a form and to support "1 to many 1 to many" relationships using multipl

Re: Uploading

2002-03-22 Thread fliptop
Octavian Rasnita wrote: > When I upload a file from my computer to a server, I choose a local file, I > open it, then I print its content into another file. > But if I want to upload a file from my local > /htdocs/ folder into the /images/ folder on the server, how could Perl know > that the spec

Re: callin subs

2002-03-22 Thread Matthew Harrison
all sorted now, thanks to you experts. it was because I have prefixed my variables with 'my' which restricted them. On Friday 22 Mar 2002 3:34 pm, Matthew Harrison wrote: > is there something that says a variable doesn;t get passed when calling a > sub in the same script? i am working on a web-b

Uploading

2002-03-22 Thread Octavian Rasnita
Hi all, I don't understand something. When I upload a file from my computer to a server, I choose a local file, I open it, then I print its content into another file. But if I want to upload a file from my local /htdocs/ folder into the /images/ folder on the server, how could Perl know that the

re: callin subs

2002-03-22 Thread Matthew Harrison
is there something that says a variable doesn;t get passed when calling a sub in the same script? i am working on a web-based role-playing game and this is the script for inside the temple: #!/usr/bin/perl ##Modules## use CGI qw/:standard/; use CGI::Carp "fatalsToBrows

Re: help with setings

2002-03-22 Thread Kim, Kiseok
Maxa wrote: > Hello to all, > I dont know how to set dbi connection to make connection whith database >EmplDir_MSAccess.mdb > > -Create database connection string, login and password variables > > my $strConn = "EmplDir_MSAccess.mdb"; > > my $strLogin = "Admin"; > > my $strPassword = "";

help with setings

2002-03-22 Thread maxa
Hello to all, I dont know how to set dbi connection to make connection whith database EmplDir_MSAccess.mdb -Create database connection string, login and password variables my $strConn = "EmplDir_MSAccess.mdb"; my $strLogin = "Admin"; my $strPassword = ""; -Open the connection $dbh = DBI

Re: Mod_perl

2002-03-22 Thread zentara
On Fri, 22 Mar 2002 01:00:48 -0800 (PST), [EMAIL PROTECTED] (Rob Roudebush) wrote: > > I have created basic forms using CGI.pm and now I'm interested in using Apache >mod_perl to speed things up and use associated apache modules. Question: Can I >continue to program using regular CGI, using pa

Re: html in a cgi script

2002-03-22 Thread zentara
On Thu, 21 Mar 2002 16:09:42 -0600, [EMAIL PROTECTED] (Camilo Gonzalez) wrote: >Can someone resend the regex they formulated for checking for valid emails? >I seem to have accidently deleted it. Thanks Go to www.cpan.org and get the Email-Valid module, the regex is in Valid.pm. -- To unsubs

Re: Printing not in correct order

2002-03-22 Thread zentara
On Thu, 21 Mar 2002 14:12:16 -0500, [EMAIL PROTECTED] (Dave K) wrote: >I have a cgi script- > >#!C:/Perl/bin/perl -wT >use strict; >use CGI; >my $q = new CGI; >binmode STDOUT; >print $q->header(-type => "image/gif" ); > >use Image::Magick; > >my $image=Image::Magick->new; >$image->Set(size=>'30x1

Re: Mod_perl

2002-03-22 Thread fliptop
Rob Roudebush wrote: > I have created basic forms using CGI.pm and now I'm interested in using Apache >mod_perl to speed things up and use associated apache modules. Question: Can I >continue to program using regular CGI, using params etc. or does mod_perl require me >to program differently?

Mod_perl

2002-03-22 Thread Rob Roudebush
I have created basic forms using CGI.pm and now I'm interested in using Apache mod_perl to speed things up and use associated apache modules. Question: Can I continue to program using regular CGI, using params etc. or does mod_perl require me to program differently? Links to good resources w