I'm using the following code for a cookie-based login. The script has no syntax error, but it is not able to send the cookie to the user's browser. In IE, it's processing for over 2 mins and then I get a timeout error.
Any help would be greatly appreciated.
I'm using CGI 2.98 w/ Perl 5.6.1 on...
I'm using the following code for a cookie-based login. The script has no syntax error, but it is not able to send the cookie to the user's browser. In IE, it's processing for over 2 mins and then I get a timeout error.
Any help would be greatly appreciated.
I'm using CGI 2.98 w/ Perl 5.6.1 on...
I would like to know how to push a hash to use it later on (in another sub-routine). I know the push function only applies for arrays but is there a similar function for hashes ?
Here's the current coding I have.
[code]
for (keys %members) {
if ($input{'pv'} eq $members{$_}{'region'}) {...
Hi,
I'm trying to sort alphanumeric data. Here's an example of the numbers:
33311a
33311b
33312
33313
Right now I'm using the "cmp" operator but I get the following results:
33312
33313
33311a
33311b
Coding:
$case{$a}{$num} cmp $case{$b}{$num}
Thanks
Hi,
I have data in a flat file seperated by delimiters.
Ex:
ID09000|Name|Name02|23
I'm using the following code in order to split all this and put it into an array:
my @field=split(/\|/,$record);
chomp $record;
Now if I want to use the value (for comparaison etc..) in the $field[3]...
Hi,
I would like to know if there is a simply way to sort by date. Dates are the the following format:
$date = yyyy-mm-dd
Right now I'm doing a simple num sorting (which certainly doesnt work)
sub sorting {
$b->[14] <=> $a->[14];
}
Hi,
I'm trying to extract dates (from flat file) which are in the following format: yyyy-mm-dd and then split the field to create an array... Here's a simplified version (no flat file) You will notice that only extract 3 dates out of 4 are extracted.
Thank you in advanced
while(<DATA>) {...
I have the following:
open(FILE,"$File.txt") || die("Could not open file!");
my @Data=<FILE>;
close(FILE);
foreach my $record (@Data) {
chop $record;
my @field=split(/\|/,$record);
if ($input{'srh'} == $field[5]) {
push (@found,[@field]);
print $field[0];
}
}
Now I want to store...
I want to select elements from x to y in the array. Right now, the code I have selects x and y
foreach my $Results (@records[$first,$last]) {
print "$Results \n"
}
Thank you in advance
Hi,
I have a flat file with the following structure:
DataTest.txt
210|Roger|Brodie|RB|NY|
221|Jake|Namol|JK|NY|210
223|Matt|Lamon|MM|NY|221
227|Litia|Lumberg|LM|NY|221
211|Peter|Givens|BV|NY|
224|Rob|Lumen|RB|NY|211
234|Lopez|Lucas|LL|NY|211
Note:
Field 0 is User ID
Field 5 is Parent...
I have phone number in the following format:
(xxx) xxx-xxxx ext. xxxxx
I need a RegEx so I can extract the 4 parts.
I have this right now
m|[(]?(\d{3})[)][ ]?(\d{3}\d?)[-](\d{4})[ ][ext.][ ]?(\d{5})|g
Since I'm generating HTML output with print "Content-type: text/html\n\n"
the print "Location: ..." function is not an option for me.
I know there's other ways to do so...
Any input would be appreaciated..
Hi,
I'm trying to come up with a url pattern matching...
If a URL is not an valid URL don't display it.
What I have so far
if ($URL =~ /(http:\/\/[0-9A-Za-z._&?=%\/~-]+)/) {
print qq!<a href="$URL">$URL</a> \n!;
}
It's not working so far...
I'm no ASP Programmer and I need an advice from you guys.
I'm trying to pass a URL with parameters...
To validate the URL, I have the following RegEx pattern.
http://.+?(/.*
This will ignore a URL with parameters separated by & (Ampersand) characters... Right ?
Ex...
If have specific properties for different server name. I came up with following:
$Server = "$ENV{'SERVER_NAME'}";
$S1_SN = 'www.domain1a.com' || 'www.domain1b.com';
$S2_SN = 'www.domain2a.com' || 'www.domain2b.com';
if ($Server == $S1_SN) {
$stylesheet = 'style.css';
}
else {
$stylesheet...
Hi experts,
I'm working on something that will only display data in the "Last xx days" (Selected by user)
Here's what I have:
FYI:
$fields[14] is the string for the field in flat file that contains the date stamp in the following format: dd/mm/yyyy
$year,$mon,$mday is the current date
if...
I want to extract records modified on the current date
The $fields[14] is structure as follow: dd/mm/yyyy
Example: 5/3/2004
$year,$mon & $mday are the current date strings
my ($fld_day, $fld_mon, $fld_year) = split(/\//,$fields[14]);
if (($year-$fld_year=0) && ($mon-$fld_mon=0) &&...
Hi,
I'm trying to link URL's with parameters (Links stored in flat file) and I'm not getting successful results:
Flat file is structured as follow:
Name=Home Page
Link=http://www.linkhere.com/library/display.asp?app=post&order=num
The line to display URL
print "<a href=\"$Link\">$Name</a<" ...
Hi,
My first thread was not very clear so I decided to create another one.
My objective is that the following fields (stored in flat file) would be displayed by category. The category would be the state which is the field [3].
-> Flat File Structure:
John|Lopes|Student|OH...
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.