On Wed, Jul 18, 2001 at 10:13:04PM -0400, Bradford Ritchie wrote:
> Could you please explain how your code suggestion below works? I've been
> staring at it for a long time but it's not getting any clearer.
Certainly. It's a hash slice.
> > my %exuser;
> > @exuser{
> > qw(root daemon
This should do it for you:
$sring =~ s/^ +| +$//;
Brian Johnson
Partner/Systems Administrator/Programmer
Source1Hosting.tv, LLC (www.source1hosting.tv)
Source1Results.com, LLC (www.source1results.com)
I may be insane, but remember - The only
difference between an insane man and a
genius is his j
Hello everybody,
A simple Q
well i want to remove spaces if any in the beginning and end of a string.
how to do this...
Waiting for Reply...
Thanx in advance
.
Hi everyone,
I have just begun to code webpages using Perl and CGI.pm (by Lincoln Stein)
not too long ago and I am encountering this problem.
Basically, on one webpage, there is a link which passes data as part of the
url like the one below:
http://mysite/test.cgi?field1=abc&field2=def ghi
As
Yep-- That did it.
THANK YOU!
gS
On Wednesday, July 18, 2001, at 09:35 PM, Jeff 'japhy/Marillion' Pinyan
wrote:
> On Jul 18, Groove Salad said:
>
>> sub normalize
>> {
>> my $file = shift;
>> my $s = sprintf("%02d",$1);
>> $file =~ s/^env-//;
>> $file =~ s/-(\d+)/$s/;
>>
>
> List,
>
> face="Verdana" size="3" color="#0155B1">$entries->{unique_id}
> - color="#0155B1">$entries->{fname}
> $entries->{lname}(input type="hidden" value=$)
>
>
> The following Hyperlink in my HTML is incorperated in my perl script. I
> want this hyperlink to parse to
On Jul 19, Rajeev Rumale said:
>I feel if I override the main exit function in some way it would solve the
>problem as this is called by default at the end.
>
>Kindly let me know how I if this is correct way? and if so how can I do this
>with interfering with exit() in other modules.
The exit()
On Jul 18, Groove Salad said:
>sub normalize
>{
> my $file = shift;
> my $s = sprintf("%02d",$1);
> $file =~ s/^env-//;
> $file =~ s/-(\d+)/$s/;
> return $file;
>}
The $1 variable is related to the (\d+) in the regex. You can't use it as
you have, since the regex hasn't happ
Hello,
> Seems like you're stuck again. Okay, the problem here is the
> ">/dev/null". Notice the ">" sign over there. It's the shell
> redirection metacharacter which causes "the shell" to pipe
> the output of
> one script to a file. When you use "system" in list context,
> like you're
> doin
Hello Everybody !,
I would like to automate a part of my script. And think that overriding the
exit() might be the solution.
This what I need to do.
For every request to an cgi script I need to perform two things
1. Some operations before executing the actual script. ( like loading
preferences
Hi again,,
Seems like you're stuck again. Okay, the problem here is the
">/dev/null". Notice the ">" sign over there. It's the shell
redirection metacharacter which causes "the shell" to pipe the output of
one script to a file. When you use "system" in list context, like you're
doing, you will
On Wed, 18 Jul 2001, MRossland wrote:
> I was wondering, what are the "Big 5 (or 10 or whatever)" Perl modules out
> there, the ones that you wouldn't be caught dead without? The number of
> modules avaible is large, and it would be nice to start in the right places.
>
> This is just a general qu
Wow, you have some good problems. Only solution I was able to come up
with was something like this:
$s = '[EMAIL PROTECTED], "Blow, Joe" <[EMAIL PROTECTED]>,Joe Blow
<[EMAIL PROTECTED]>';
while($s) {
# This is to match [EMAIL PROTECTED]
if($s =~ /^([\w._]+\@[\w._]+),?\s*/) {
$s = $';
[EMAIL PROTECTED] (Will Cottay) writes:
> I changed line 1860 in 5.6.0/CPAN.pm to read:
>
> my $ftp = Net::FTP->new($host, Passive=>1);
>
> which works here, but I didn't spend much time looking to
> see if anyone had done it properly.
export FTP_PASSIVE=1 (or setenv FTP_PASSIVE 1 or whateve
On Wed, 18 Jul 2001, Stephanie Stiavetti wrote:
> I'm writing a script to check for validity of form elements. here's what I
> have so far:
>
> my ($job) = $cgi->param("job");
>
> bla bla bla more script bla bla bla
>
>
> sub fixFailed
> { my (@failedFields);
> my ($validForm)="1";
>
>
Hello,
# use
@args = ("/dir1/dir2/prgname","arg1","arg2","arg3","-p","/dev/null");
$rc = system @args;
since "-p" is an argument just as much as "/dev/null" is an argument.
Hope this helps,,,
Aziz,,,
In article <[EMAIL PROTECTED]>, "Ken Cole"
<[EMAIL PROTECTED]> wrote:
> if from the com
Brian <[EMAIL PROTECTED]> wrote:
>
> I'm way rusty on my regexp's (been on vacation for a month without doing
> any) but try this:
>
> $s =~ m/^([^,]+),\s*(\".+\>),(.+)/;
>
> $1 will be "[EMAIL PROTECTED]"
> $2 will be '"Blow, Joe" <[EMAIL PROTECTED]>'
> $3 will be "Joe Blow <[EMAIL PROTECTED]>
Hi Michael,
Could you please explain how your code suggestion below works? I've been
staring at it for a long time but it's not getting any clearer.
It looks like a neat construct but I don't get it...Thanks.
-- Brad
>
> >
Hi:
I made the change and the env-mmdd-0 file is indeed the first in the loop. Now they are not incrementing:
The next file should be env-mmdd-1 env-mmdd-2 etc, but instead I'm getting this:
checking: env-20010712-0 for message, GDPN9D00.SRY
checking: env-20010712-0 for message, GDPN
if from the command line a run
/dir1/dir2/progname ar1 arg2 arg3 -p /dev/null
it works.
if I do:
@args = ("/dir1/dir2/prgname","arg1","arg2","arg3","-p /dev/null");
$rc = system @args;
The application stops with an error saying the -p /dev/null is an
invalid argument.
It is a standard argume
On Jul 18, Groove Salad said:
>Thanks for the quick response. I think what you've described is a bit
>over my head. But, I'll try it and see what happens.
>
>The files will always be, env-mmdd-nn and will get rotated at months
>end. However, your solution much more flexible.
Since they'll
Thanks for the quick response. I think what you've described is a bit
over my head. But, I'll try it and see what happens.
The files will always be, env-mmdd-nn and will get rotated at months
end. However, your solution much more flexible.
Thanks again,
gS
On Wednesday, July 18, 2001,
On Jul 18, Groove Salad said:
>checking: env-20010712-0
>checking: env-20010712-1
>checking: env-20010712-10
>checking: env-20010712-11
>checking: env-20010712-12
[snip]
>checking: env-20010712-7
>checking: env-20010712-8
>checking: env-20010712-9
>
>How can I get them in numerical order? I tried
On Wed, Jul 18, 2001 at 04:39:05PM -0700, MRossland wrote:
> I was wondering, what are the "Big 5 (or 10 or whatever)" Perl modules out
> there, the ones that you wouldn't be caught dead without? The number of
> modules avaible is large, and it would be nice to start in the right places.
>
> This
Hi,
At the moment, I'm doing: my $temp_obj = bless {}; in a childs SUPER class
to create an object of SUPER's type that I can then use to call methods
like: $temp_obj->method_two(); This ensures that when method_two does a
$self = shift; and uses $self to call methods that exists in both the chil
Hi,
Is it possible to package all the modules and main perl program
inside a zip, jar or cab file and run this ?
Archiving the runtime code provides portability and compactness
but does PERL have something similar to the JAR utility in
JAVA ?
Thanking You
in advance
Okay, the regexp:
$line =~ s/^\s*(.+?)\s<(.+?)>,*/$1, $2/;
Basically, $1 holds what is in the first set of (), and $2 holds what is
matched in the second set of (). In otherwords, if you had the line:
bob
$1 would hold "bob", and $2 would hold "something in here". So, this
regexp would rep
Thanks for the regex, but that wasn't quite what I needed, it's functional
but I still don't know how it works !
$line =~ s/^\s*(.+?)\s<(.+?)>,*/$1, $2/;
OK so what does the $1 and $2 mean , what are they pointing to and how do I
manipulate them...
and what does the $& thingy do as well.
Much
Hi All:
If I have files like the following:
checking: env-20010712-0
checking: env-20010712-1
checking: env-20010712-10
checking: env-20010712-11
checking: env-20010712-12
checking: env-20010712-13
checking: env-20010712-14
checking: env-20010712-15
checking: env-20010712-16
checking: env-20010
I would like to place my vote for these 3:
CGI.pm
DBI
Date::Calc
I think I use these 3 more than any others.
Brian Johnson
Partner/Systems Administrator/Programmer
Source1Hosting.tv, LLC (www.source1hosting.tv)
Source1Results.com, LLC (www.source1results.com)
I may be insane, but remember - The
Hi all,
I was wondering, what are the "Big 5 (or 10 or whatever)" Perl modules out
there, the ones that you wouldn't be caught dead without? The number of
modules avaible is large, and it would be nice to start in the right places.
This is just a general question, with no specific task in mind.
I'm writing a script to check for validity of form elements. here's what I
have so far:
my ($job) = $cgi->param("job");
bla bla bla more script bla bla bla
sub fixFailed
{ my (@failedFields);
my ($validForm)="1";
#validate job selection
if (!$job) {
Lightning flashed, thunder crashed and "Customer Service" whispered:
| The string sections I want are:
|
| &firstname=Nathan&lastname=Garlington& # for the $who and
|
| &submitButtoncattleman=Get+Quote%21 # for the $quote_type scalar.
Based on these lines, I'm assuming this is coming from a
I am trying to follow some good advice that Randal and Brian
gave me earlier. I have a rather basic question, however.
I want my script to print:
At (current time) on (date), $who submitted a request for a $quote_type
quote.
Thanks to Brian, I have the time aspects all worked out.
Just a note on this. This does not work with all dbd's the version of
DBD::ODBC I work with is one where it will not work. No matter how many rows
are actually returned, $rows will always be -1 on this dbd. This is hinted
at in perldoc DBI by the use of "if available" in the descriptions of this
t
* Michael Fowler ([EMAIL PROTECTED]) [18 Jul 2001 18:24]:
[...]
> _Object Oriented Perl_ gets pretty advanced, but it does have chapters
> on basic OO in Perl, and basic OO in general.
It would probably be more accurate to say that _Object Oriented Perl_
takes one from knowing not necessarily an
Hello,
The simplest way to do this is to first find the max length of the
numbers:
my @ar1 = qw/116 44 45 49 71/;
my @ar2 = qw/1 1 3 5 1/;
my $max = length ((sort {$b <=> $a} (@ar1,@ar2))[0]); # assuming all
Komodo 1.1 (downloaded last week) seems to have cleared up the mathmatical
division problem.
- Original Message -
From: "Stephen Neu" <[EMAIL PROTECTED]>
To: "Perl Beginners (E-mail)" <[EMAIL PROTECTED]>
Sent: Friday, June 22, 2001 11:56 AM
Subject: RE: Perl IDE Reviews
> Don't know if
Hello,
How about doing this:
my @cols = qw(firstname lastname title phone email age location address
address2 city state zip zip2 inst school_type grades_taught subjectarea_1
subjectarea_2 subjectarea_3 subjectarea_4 subjectarea_5 subjectarea_6
how_heard Occupation);
my $dbh = DBI->connect(.
hi fellow perl beginners,
any idea how to move the 100 daily messages from this list to another
folder before it gets to my unix based email client (pine). i read
somewhere that it is better to deal with the mail transfer agent, before
it gets to pine. (or something like that),
thanks in advance
--- Ruth Albocher <[EMAIL PROTECTED]> wrote:
> hi
> can you please tell me what is the difference between the two
> parameters
> in the call:
>
> create_unit(SDunit, 'SDunit_name'); (it is code i need to
> maintain...
> )
Well, SDunit there is a bit odd.
looks like a bareword -- does the scri
There is a decent start for a guest book in Learning
Perl (Chapter 19). Read through it, add any security
measures (as noted previously in this thread), and
you will have a generic guestbook.
Once you have done that, you have a script which can
be edited and have functionality added. It is ver
I changed line 1860 in 5.6.0/CPAN.pm to read:
my $ftp = Net::FTP->new($host, Passive=>1);
which works here, but I didn't spend much time looking to
see if anyone had done it properly.
-will
Terry Poperszky wrote:
>
> Question? How do I set MCPAN to use passive FTP connection?
>
> Terry
--
I think you need to start reading on a few books my friend.
here are a few places to start:
read the regexp tutorial i wrote at http://japh.nu
read "perldoc perlre" for more details
look into getting "learning perl" by randal schwartz, it will teach you many
of the basics you'll need for Perl
n
Why does this work:
open(APACHE_CONF, "/usr/local/apache/conf/httpd.conf") or die "Could
not open Apache config file:\n$!\n";
my @servernames;
while() {
push (@servernames, $1)
if/ServerName\swww.(.*)/;
}
close(APACHE_CONF);
I recently had a similar problem, but I took the lazy man's way out and
substituted user-typed apostrophes with back quotes, using the following
regexp:
$message =~ s/'/`/g;
Simple, but few people notice the difference between the two characters.
Steven Yarbrough
--
To unsubscribe, e-mail: [
Hy,
I'm interesting by a perl script for analysing a PIX firewall loggings
if you have any informations please write me
regards djilali ELKHIA
Oops!
I just discovered a little mistake made by quick copy'n'paste.
The line
elsif ($url =~ /^http:\/\//i)
should read
elsif ($url =~ /^ftp:\/\//i)
of course.
Sascha
--
"We Apologize For The Inconvenience"
(God's Last Message To His Creation by Douglas Adams)
hi
can you please tell me what is the difference between the two parameters
in the call:
create_unit(SDunit, 'SDunit_name'); (it is code i need to maintain...
)
(if it helps, then in the create_unit function, i get
my $self = shift;
my $type = shift;
my $name = shift;
my $unit;
Question? How do I set MCPAN to use passive FTP connection?
Terry
Lightning flashed, thunder crashed and Liger-dc <[EMAIL PROTECTED]> whispered:
| I have a formatting question:
| I have 2 arrays with integers that I want to print, with one array above the
> other so that the
| matching entries end up in the same column. Currently they look like..
|
| 116 44 45
Lightning flashed, thunder crashed and "Sascha Kersken" <[EMAIL PROTECTED]> w
hispered:
| if ($url =~ /^http:\/\//i)
Try and save yourself from going blind trying to decipher all those slashes
and backslashes. If you have a literal slash in your code, change your
delimiters:
if ($url =~ m
Lightning flashed, thunder crashed and "Sparkle Williams" <[EMAIL PROTECTED]>
whispered:
| I'm trying to write a perl script that can distinguish between http and ftp
| files. I got it to work on my UNIX system using case, but I can't seem to
| get it to function correctly when I switch to usin
using 'my' within the while loop will make it lose it's value once the loop
exits and it will be reset every time you read in a new line
declare 'my @list' above the loop, and you'll not have that problem.
for readabillity, use:
if(/(\S+/){ push @list, $1 }
altho that's a bit superfluous i think,
On Wed, Jul 18, 2001 at 03:59:14PM -, [EMAIL PROTECTED] wrote:
>
> #how to set an accessmethod
> sub accessmethod{
>
> my $self = shift;
>
> if (@_) { $self->[ACCESS_METHOD] = shift }
> return $self->[ACCESS_METHOD];
>
> }#end accessmethod
>
>
> #here the problem occurs when trying to up
In message <[EMAIL PROTECTED]>, Michael Fowler writes:
>On Tue, Jul 17, 2001 at 06:43:14PM -0400, Jared Chenkin wrote:
>> I'm kinda rusty on my perl..had to work in java for a while =(
>> How do you take a multidimensional hash such as $hash{$key1}{$key2}{$key3} and
>write it
>> to a database fil
Here's what I have now:
while() {
push (my @list, $1)
if /(\S+)/;
}
foreach my $h(my @list) {
print "$h";
}
I need to be able to access each individual host in the "FP" file pointer.
This doesn't print anything to the screen.
The foreach at the end is your alphabetical problem. But, there is
another problem here. If you don't use foreach $key (sort
keys(%formdata)) { the keys will be in a random order. You'll need to
tie the %formdata has using the Tie::IxHash module. Example:
#!c:/perl/bin/perl -w
use strict;
use
Anna,
There might be some help at http://theoryx5.uwinnipeg.ca/CPAN/data/Date-Calc/Calc.html
Jerry
[EMAIL PROTECTED] wrote:
>
> I know this might be easy but since I'm still learning
>
> Is there a easy way to have perl generate information to find out what the 3rd
>friday is for each m
On Wed, Jul 18, 2001 at 12:32:21PM -0400, [EMAIL PROTECTED] wrote:
> Is there a easy way to have perl generate information to find out what the
> 3rd friday is for each month? I have been looking at some cpan modules
> and none of them seem to do what I need.
Date::Calc has a subroutine, Nth_Wee
Best I can think is maybe using the Date::Manip module in a foreach or
while loop to test each day and see if it is the 3rd week, and if indeed
the day is a Friday. This would be kind of slow since you would have a
lot of days to go through, but it would work.
http://search.cpan.org/search?dist=
it's essentially the same thing, only instead of handing the match to the
print operator, we store it in @list
like so:
open(FP, "$tempfile"); # Open $tempfile for reading
while() { push @list, /(\S+)/ }
$list[0] will hold the first match, $list[1] the 2nd and so forth
hope this helps,
Jos
>
Here is the answer I gave about a day ago, but like a foolish man I
posted it to the wrong list (beginners instead of beginners-cgi).
Foolish Outlook mistake on my part. Sorry about that. But anyway, here
ya go:
I was involved in the writing of www.e-mol.com and we ran into this same
problem, o
On Wed, Jul 18, 2001 at 03:59:14PM -, [EMAIL PROTECTED] wrote:
> I am doing some Object Oriented programming in Perl.
> I have a problem getting the instance variables in some of my
> classes updated.
This is probably your problem right here. Instance variables are, by
definition, not clas
How about this? (using printf)
#!\Perl\bin\perl
#I have a formatting question:
#I have 2 arrays with integers that I want to print, with one array above
the other so that the
#matching entries end up in the same column. Currently they look like..
#
@ar1 = qw(116 44 45 49 71);
@ar2 = qw(1 1 3 5 1)
I need to read some data from an input file. I have a regex that picks
out just numbers from the file, but I can't seem to be able get the ones
I want.
Here is the code I wrote:
open (KA, "K.a") || die #reads file "K.a"
"can't open K.a: $!";
LINE: while () { #r
On Wed, Jul 18, 2001 at 04:27:28PM +0100, David Wood wrote:
> Another point to mention is that DBI->quote looks not only at the value
> being inserted, but also to the data_type of the table/field it's going
> into, and replaces undef values with an unquoted NULL value, if
> appropriate. This is
I have a formatting question:
I have 2 arrays with integers that I want to print, with one array above the other so
that the
matching entries end up in the same column. Currently they look like..
116 44 45 49 71
1 1 3 5 1
and I want them to look like
116 44 45 49 71
1 1 3 5 1
The probl
Hey all! Thanks for everybodys help so far! Finally got the parsing script
to work! Very excited about that. As a new perl programmer, my confidence is
rising. Just used a cut & paste script, but had to reconfigure. At least I
know what each line of code does (or think I do anyway). Heard that
On Wed, Jul 18, 2001 at 03:11:22PM +0200, Sascha Kersken wrote:
> Oops!
> I just discovered a little mistake made by quick copy'n'paste.
> The line
>elsif ($url =~ /^http:\/\//i)
> should read
> elsif ($url =~ /^ftp:\/\//i)
> of course.
Actually, it should probably read something like:
That really wouldn't work : )
Here we go:-
# I'm assuming a DBI connection open with a handler called $dbh!
while () {
chomp;
# Make each line a hash
my %hash;
@hash{qw(firstname lastname title phone email age location address
address2 city state zip zip2 inst school_type grades_taught
On Wed, 18 Jul 2001, Craig S Monroe wrote:
> I basically a have a series of nested while loops that prompts the user
> down a particular decision tree to a result.
> What I was wondering, is there a way to exit an inner loop directly to the
> initial while loop to start the program from the begin
I basically a have a series of nested while loops that prompts the user
down a particular decision tree to a result.
What I was wondering, is there a way to exit an inner loop directly to the
initial while loop to start the program from the beginning?
It looks as though labels are only effective i
use Data::Dumper;
my $bears = {}; # declare here so it'll be available after while()
my $n = 0;
# for examples sake we're using DATA internal filehandle
while()
{
chomp;
my ($name, $type, $color, $food) = split /\|/;
$bears->{"rec$n"} = {};
%{ $bears->{"rec$n"}
I know this might be easy but since I'm still learning
Is there a easy way to have perl generate information to find out what the 3rd friday
is for each month? I have been looking at some cpan modules and none of them seem to
do what I need.
I did find something that might do it but it
Hey David
i tryed to pass the entire SQL statement through the
dbh->quote like this and printed to see what i got and it is not quoting the
input any ideas here is the code
while()
{
chomp;
my
($id,$firstname,$lastname,$title,$phone,$email,$age,$location,$address,$addr
ess2,$city,$state,$zip,
On 18 Jul 2001 12:06:50 -0400, David Gilden wrote:
>
> Take this Data structure (which is an anonymous hash)
>
> #
> # $bears = {
> #
> #
> # rec0 => {
> # name => 'sweaterie',
> # type => 'sweater',
> # color => 'golden brown',
> # fo
On 18 Jul 2001 [EMAIL PROTECTED] wrote:
> I am doing some Object Oriented programming in Perl.
>
> #my class constructor
> sub new {
>
> my $invocant = shift;
> my $class = ref($invocant) || $invocant;
> my $self = [];
> $self ->[ACCESS_METHOD] = undef;
> $self ->[TOTAL_ACCESS_TIME] = undef;
> $s
Take this Data structure (which is an anonymous hash)
#
# $bears = {
#
#
# rec0 => {
# name => 'sweaterie',
# type => 'sweater',
# color => 'golden brown',
# food => 'mixed berries',
# }, # ect
# };
I am
If your file really looks like that and you're really only
trying to print the first column just:
cut -d' ' -f1 < your.file
from the command prompt.
or if you want the dns server name instead:
tr -s '[:blank:]' '\t' < cu.txt | cut -f2
-will
Tyler Longren wrote:
>
> Hello everyone,
>
> I h
I am doing some Object Oriented programming in Perl.
I have a problem getting the instance variables in some of my
classes updated.
If I update one variable in a class that contains several instance variables,
then the other variable does not keep its original value, it gets the
same value
Pierre and other who have given me help:
Since writing this message I have stumbled across the Win32::SetupSup
module. Using this I am able to do the modal window plus kill window, min
and max window, hide window in system tray, print all windows and other
stuff that is not all that useful. I did
Hmm... I tried posting this at [EMAIL PROTECTED] but haven't gotten
much back so I'll try here...
Hi all,
I hope this isn't a goofy question ;-) I have a simple CGI front end
for processing Snort logs with Calamaris. It is currently set up like this:
sub do_report
{local ($command) = @_;
Can we see a little more of the code? :o)
Doug
-Original Message-
From: Richie Crews [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 11:43 AM
To: Richie Crews; [EMAIL PROTECTED]
Subject:RE: Ok brain fart here...
Ok my problem is something not shown in the cod
Ok my problem is something not shown in the code... I was using a my $exch =
"ICWPEX01" for each if statement and the my's seemed to be canceling it
out...
Richie Crews
Unix Systems Administrator
(706) 773 - 3436 CELL
(706) 634 - 3681 DESK
(706) 634 - 3831 FAX
What are the errors? It works fine here.
-Original Message-
From: Richie Crews [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 10:27 AM
To: [EMAIL PROTECTED]
Subject: Ok brain fart here...
Ok I am beating my head why this is not working...
$fname = ;
chomp $fname;
$fletter
--Warning-- Newbie responding
In what way is it not working?
I may be making the same mistake as you. It looks good to me, excepting
that there's no prompt to tell someone to type in a string. So if it ran
as-is, it would appear to be hanging there, when it's just waiting for
input.
-John
On 18 Jul 2001 11:26:45 -0400, Richie Crews wrote:
> Ok I am beating my head why this is not working...
>
> $fname = ;
> chomp $fname;
> $fletter = substr($fname,0,1);
> # now we have the first letter of the first name
> if ( $fletter =~ /[a-f]/i) {
> print "First letter is a-f\n";
>
I did a cut and paste and it seems to work fine here.. What errors do you
get or what result?
Doug
-Original Message-
From: Richie Crews [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 11:27 AM
To: [EMAIL PROTECTED]
Subject:Ok brain fart here...
Ok I am bea
Ok I am beating my head why this is not working...
$fname = ;
chomp $fname;
$fletter = substr($fname,0,1);
# now we have the first letter of the first name
if ( $fletter =~ /[a-f]/i) {
print "First letter is a-f\n";
}
You get the picture I would have other if's based on the first
Or, at the risk of beating a dead horse:
#!/usr/bin/perl -w
use strict;
my $url = shift || '';
$url =~ /^(.*?):/;
my $protocol = lc($1);
my %handlers = (
'http' => \&http_handler,
'ftp' => \&ftp_handler,
'https' => \&http_handler,
'ftps'
Thank you very much Abdulaziz, it works perfectly. I did not even know such
a header existed, at first I was confused about what you were trying to say,
but I looked around on the net and found what you meant.
My page works flawlessly now, however I'm still puzzled why my meta refresh
did not wo
Incidentially, (and please don't take this as being picky, merely an
observation)
I have found that the qq method does not work 100% of the time, also!
I've had to change code that was produced by an external contractor that
was using this
method and failing on unquoted apostrophes. Changed to D
>I'm not competant enough to write a complete guestbook script, only to edit
>scripts I find. Any ideas where I can get a new guestbook script?
You could try the following (in that order):
http://perlarchive.com/
http://www.cgi-resources.com/
http://www.hotscripts.com/
--
Morbus Iff
On Wed, 18 Jul 2001, Sally wrote:
> Apart from the dates on the top of the script, how can you tell it's old,
> and why is it bad stuff?
Because it was written by Matt Wright, and his scripts have been notorious
for being porrly written, hard to maintain, and full of security holes.
-- Brett
Hey all,
Okay, I'm still trying to get this log file script to work. The end
result should just be, if it's the 18th, the log file should be
09FIMSOM090Aevent-20010717.log. However, I keep getting it to produce
the same day, instead of the previous. This script is set to run on an NT
server
I'm not competant enough to write a complete guestbook script, only to edit
scripts I find. Any ideas where I can get a new guestbook script?
-Original Message-
From: Morbus Iff [mailto:[EMAIL PROTECTED]]
Sent: 18 July 2001 15:22
To: [EMAIL PROTECTED]
Subject: RE: unix perl to win NT perl
>Apart from the dates on the top of the script, how can you tell it's old,
>and why is it bad stuff?
Much like cultures, programming evolves over time. It's old and bad because:
1. it's not written with security in mind. when the internet
comes in play, security should be the number one
David's method is probably better, but I still use just a long row of ?
marks even in this situations. 20 odd question marks is not too bad ;)
Somehow I've had more problems with the $dbh->quote($str) which very well
may be because of my own errors.
J
-Original Message-
From: borakovej
1 - 100 of 131 matches
Mail list logo