I changed my version of the code slightly so that the only variable that the script needs is which letter/word you want to find (because before it sort of needed to know how many letters/words the array contained (shown by the until ($no == 4);)...
#! usr/bin/perl
use strict;
#####
print...
They aren't even encrypted. I don't get why they need to be??? The correct username and password is stored in a text file which is highly secured using htaccess, no one can view the correct username an dpassword
I don't know if this helps...
I once had a left right scroll bit at the bottom...
I had a navigation box on the left, and a main section on the right. By giving the main section a 100% width it made the page had to scroll as much as the navigation was width... I solved it by indenting the text...
Ok maybe I have figured out what you were saying...
@array = ('one', 'two', 'three');
$aaa = @array;
print "@array";
The output is the number of words the array contains (3)...
@array = ('one', 'two', 'three');
$aaa = "@array";
print "@array";
The output is the words the array contains (one...
I can only figure, that if I pass an array onto a scaler, then it counts the number of words the array contains, otherwise if I don't pass it to a scaler it prints the words contained within the array
I read that the \a sounds an alarm (bell). I tried using this script...
#! usr/bin/perl
use strict;
print "Content-type: text/html\n\n";
print "\aHello!\n";
The result is a little square box and the word Hello.
Anyone know why I don't get a bell sound>?
Well, no hehe. When the user logs in the first time, when they click login, a hidden field carries the username and password, so once in the admin area, if they click on another button i check if the username and password carried by the hidden field is the same as in the file storing it. This...
Thats really strange. When I first built a user login system using perl, I used a really simple idea, which involved checking to see if the file contained the correct username and password. Below is part of my code...
$ausername = param('username');
$apassword = param('password');
$auserpass =...
I was presuming that 1 word was stored in the file. If I'm taking multiple words from a file then I would use split, to split all the words into individual scalers. However you would need to know how many words there are. Is there a way to count the number of words in an array, something like...
Ill tell you what, I have a Visual Quick Start guide for PHP and it has lots of examples, including a user authetication system.
However, my main script language is perl... I do all the coding, and store all important info like passwords in a text file. I then secure just the text file with...
I have just thought about what you said. You said that it will check the length of @logmessages and see if its the same length (is that what you meant?).
if @logmessages = hello
therefore if the code was
if (@logmessages eq "hello"){
print "hello"
}
Then surely it would see if hello is equal...
yeah your right, I just saw in my book that it also says put g at the end if you want to replace all strings...
Another useful thing is to put i as well, and this ignores the case of the letters
so..
$message =~ s/damn/bunnies/gi;
I have been learning Perl now since Christmas this year and I feel I have achieved a great deal. One day shopping in Reading I found a book called Perl and CGI for the World Wide Web (Visual Quick Start Guide) and it gave me an excellent start. Since then I have brought 5 O'Reilly books...
Perl...
Yeah I apologise, that script however would check if the file contains the word "true" on its own, but it wouldnt work if they file contained multiple words. My new suggestion would be to use...
$value = 4;
open (LOG, "<log.txt") || Error('open', 'file');
flock (LOG, 2) || Error('lock'...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.