Eric Preece <[EMAIL PROTECTED]> wrote:
> Yet another newbie question. I have a file, each line
> is a pipe delimited list (user name and password). I
> want to open the file, search through each line using
> the first entry as a key (so this may turn into a
> question about hashes, but I am no
Connie Chan <[EMAIL PROTECTED]> wrote:
>
> Sorry everybody... I know scalar(@array) and $#array's
> different... I do this just normally, I like to count
> from 0 as well.. so I treat the elems like this...
>
> What I am trying to ask is when this happen...
>
> sub something
> {my ($hash, $
open(COUNT,") {
chomp;
if($_ =~ /BC0012/) {
my($key,$count) = split('=',$_);
$count++;
print "$count\n";
}
}
close(COUNT);
"David Gerler" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> okay... see
Hi,
I have a script that allows my users to login. The script checks for valid
username and password. After that, it will then redirect to a url
containing the valid username and password and those variables are converted
to hexadecimal. The problem is that if the user gives out the url to
som
Of cause, Cookies can help, if you want some modules can deal with
cookies, look at : http://search.cpan.org/search?mode=module&query=Cookies
But how to let the cookies becomes a reliable issue, that depends how
you design on it.
But the concept on using cookies is somewhat talking about GET some
> > sub count {
> > open (COUNT, "+>./count.dat") or die "cannot open countfile: $!";
> > flock(COUNT, 2);
> >
> > while (){
> > if (m/BC0012/i){
> > ($key, $count) = split('=',$_);
> > $found = 1;
> > $count++;
> > } else {
> >
From: drieux <[EMAIL PROTECTED]>
> On Friday, July 26, 2002, at 07:58 , Connie Chan wrote:
> > And one more quick question. What are the meanings of
> > "Expression" and "Block" , what are there difference ?
>
> an 'expression' is something that can be resolved,
>
> my $val =
>
> These are all expressions:
> 1
> 1 + 2
> $x * 2
> foo(1,2,3) + 49
> (1,2) x 2
> $x == $y
> $x < 5
> $x > 1 && $x < 5
> but even this is an expression:
> $x = $y + 2
>
> Basicaly "expression" is something that creates a value that you can
> assign to a variable, pass to a function or use as
I thought that was the applicable part. :-) Guess I needed more After the while
loop, I would write the output to Count according to whether it was found or not. If
it was found it should substitute the new cont for the old. If not found, it adds it
to the end.
After getting your email a
On Jul 27, Paul Tremblay said:
>I ran a benchmark on your method, and it actually proved slower. I ran a
>test line 10,000 times. Directly substituting each line took 38 wall
>seconds. Using your method took 60.
That's because my method requires creating a hash each time. If you were
to take th
Sorry, still can't get your logic... But there's a better approach
here :
open COUNT,"count.dat"; # ./ mean current dir, so, it's not nessary
open TEMP, "temp.dat" ;
Then , for the entire loop, you can read from COUNT, and write to TEMP.
At last, unlink the COUNT file, then rename the temp.dat
Janek Schleicher wrote:
> Drieux wrote at Fri, 26 Jul 2002 18:07:51 +0200:
>
>
>>p2: but I will religiously stand by the driving thesis:
>>
>> "would you really want to maintain that code?"
>>
>>having come back and 'blanched' at code that was no longer as 'readable' as it had
>once been
On Saturday, July 27, 2002, at 08:33 , Wiggins d'Anconia wrote:
> Janek Schleicher wrote:
>> Drieux wrote at Fri, 26 Jul 2002 18:07:51 +0200:
>>> p2: but I will religiously stand by the driving thesis:
>>>
>>> "would you really want to maintain that code?"
>>>
>>> having come back and 'blanch
Thanks to John Krahn and Mark Anderson.
I have the numbers I need now.
From: "John W. Krahn" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Steve wrote:
>
> From what I have read from The Camel $1 should contain the matched text.
> From that matched text I want to then search for an additional stri
On Sat, Jul 27, 2002 at 11:23:59AM -0400, Jeff 'japhy' Pinyan wrote:
>
> That's because my method requires creating a hash each time. If you were
> to take that out of the function, it would run faster.
Right. This makes perfect sense.
I followed your advice and put the hash outside of the su
On Jul 27, Paul Tremblay said:
>The only problem is how I should replace "&", ">", and "<". I think I'll
>do single line subs for this text. Even with huge files it shouldn't
>take more than 1/2 a second or so, and that allows me to use your
>original method to speed things up.
>
>Or this just oc
Jeff 'Japhy' Pinyan wrote:
>
> On Jul 27, Paul Tremblay said:
>
> >The only problem is how I should replace "&", ">", and "<". I think I'll
> >do single line subs for this text. Even with huge files it shouldn't
> >take more than 1/2 a second or so, and that allows me to use your
> >original met
On Jul 27, John W. Krahn said:
>> No, $1 is either "&" or undef. Perhaps you want:
>>
>> s[([&<>])|\\($rx)][<$rep{$+}/>]go;
>>
>> That $+ means "the last () that matched". But that still replaces & with
>> <&/>. So you'd need to make the '<' and '/>' part of the %rep hash's
>> values. I wou
I have two perl distribution on the same computer.
The ActiveState distribution has PPM. I used this to install
Win32::TaskScheduler package and all is well.
For my other perl distribution, I thought I would just copy the files
in the two packing lists to the appropriate directories but perl i
I did some more experimenting and discovered that the culprit was
perl56.dll. For some reason, the perl56.dll is not compatible with
TaskScheduler.dll in this distribution. If I simply replace this one
file from ActiveState, it works but I cannot live with this fix.
Anyways, PPM seems to have jus
Before I re-invent the wheel. Is there a perl parser routine for
crontab format files?
I have cron.pl written by Scott McMahan.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Sat, Jul 27, 2002 at 02:40:52PM -0700, John W. Krahn wrote:
>
> I thought '<' and '/>' were already in the hash values? If so, wouldn't
> this work?
>
> s[([&<>]|(?<=\\)$rx)][$rep{$1}]go;
>
>
>
I don't understand this syntax:
> s[([&<>]|(?<=\\)$rx)][$rep{$1}]go;
^^^
Chris --
...and then chris said...
%
% Before I re-invent the wheel. Is there a perl parser routine for
% crontab format files?
Have you taken a look at
http://search.cpan.org/search?mode=module&query=cron
yet?
HTH & HAND
:-D
--
David T-G * It's easier to fight for
Sorry for the interruption, everyone.
Chris, your email address (@home.com) is dead. Would you mind fixing it?
HAND
:-D
--
David T-G * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
24 matches
Mail list logo