i have been working on perl so far..
wanted to give php5 a shot..
i am using ubuntu edgy eft..
i got mysql and apache2 and php working..
but when i try to use mysql_connect() in a php script..
it gives me an error
"Fatal error: Call to undefined function mysql_connect()"
I then did
sudo...
I would like to time few perl statements and then re-run them if they exceed a fixed amount of time.
eg.
{
foreach $var(@somearray)
{
print $var;
}
}
What i want to do is time this block and if this block exceeds more than say 10 minutes to run, I...
Cant understand this strange behavior with math.h.
<code>
#include<math.h>
int main()
{
double t = log10(10);
return 1;
}
</code>
works fine
but
<code>
#include <math.h>
int main()
{
double t1=10;
double t = log10(t1);
return 1;
}
</code>
gives the following error...
One way of doing this would be to save/append the names of the folders that have already been processed in a txt file and use that txt file everytime you run the program to get a list of files that have already been processed.
I think this mite work
$template->param( 'Welcome' => [$welcome] );
Basically you will hav to pass the loop variable an array reference of hash references.
So if you just want to pass one hash reference you can do the above.
Or you can try this if you want to pass many references
# Repeat...
if($messages[$_]->{'MessID'} eq "Welcome"){
%welcome = $messages[$_];
I have a doubt in this statement.
Arent you assigning a reference to a hash to a hash.
Shouldnt it be
$welcome = $message[$_];
and
$template->param( 'Welcome' => $welcome );
I think this might work.
A small correction to the prev entry.
CODE
my $picture = $query->param( "picture" );
for ( @$picture ) {
my $file = $_;
next if ( $file = '.' );
// shd be $file eq '.'
next if ( $file = '..' );
// shd be $file eq '..'
print qq{
<h1>I got me a picher!!</h1>
<p...
Actually it workd without the chomp also.
You can try checking if there are any special characters that word introduced into the input file.
When i copied the input into a normal text file. it workd for me..
I just commented the prints.
foreach $line (@lines) {
#chomp($line)...
$stop1 = ":10070000";
for($loop=0;$loop<@input;$loop++)
{
# if the line contains your stop parameter get out
if($input[$loop] =~ /$stop1/i){
$tmp1 = $input[$loop+1];
$tmp2= $input[$loop+2];
# This can be done in a loop as well
$i=0;
$tmp .= $input[$loop+$1]...
my $sql1="SELECT OU, OP, QU, QP, FNUM, MESSIGE, RED, FREDNO, QNUM from BABBLE WHERE OU=\"$MET\ AND OP=\"$YUT\"";
I dont see an ending double qoute.
OU=\"$MET\(") ??
and shouldnt u be using single quotes instead of double ?
Error on my part.
it shd hav been
$n++ unless ($small_string =~ /^\s*$/);
not
$n++ if ($small_string =~ /^\s*$/);
Hence the count was for the empty strings which
were 81, 19 were the strings with data in them - total 100.
I think there might be a correction to Kevins program.
Incase the small string has blank spaces and you dont want to count that either the following program shd work.
"Now, I would like to get a count of that substr - that actually has values, that isn't empty or blank"
my $n = 0;
while...
$r->setAuthenicationProgram($auth_program->{$user_type}->{$mode});
This is a instance method call.
The $r is the instance variable or reference.
The functions 'setAuthenicationProgram' first parameter is $r - the instance variable or object variable which is a reference.
The second parameter...
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.