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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 = "";
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
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
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
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
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?
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
21 matches
Mail list logo