Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. vjcyrano

    trouble getting php5 to work with mysql.. help needed

    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...
  2. vjcyrano

    How to time your statements in perl ?????

    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...
  3. vjcyrano

    Strange behavior with math.h -> function log10

    Thanks sedj.. But I am not able to understand why it does that ..
  4. vjcyrano

    Strange behavior with math.h -> function log10

    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...
  5. vjcyrano

    Variables not printing on web page...

    The program looks good to me. Did you try running the program from the command prompt/shell before trying it in the browser.
  6. vjcyrano

    How to call a sql function in perl

    Try this my $sql = qq[EXEC wag_batch_ddl.table_stats('pbm_eob_patient')]; my $sth = $dbh->prepare($sql); $sth->execute();
  7. vjcyrano

    Creating a newline in Perl using CGI

    For a browser to understand new line you will have to use <br>.
  8. vjcyrano

    Please Help

    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.
  9. vjcyrano

    Quick 'splice();' question.

    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...
  10. vjcyrano

    Quick 'splice();' question.

    Doesnt it work when u try this <tmpl_loop name='Welcome'> <tmpl_var name='Message'> <tmpl_var name='MessId'> <tmpl_var name='MessDate'> </tmpl_loop>
  11. vjcyrano

    Quick 'splice();' question.

    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.
  12. vjcyrano

    module install trouble

    try changing the permissions of the directory /usr/lib/perl5/site_perl/5.6.1 and then try creating the Proc directory
  13. vjcyrano

    How do I do this?

    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...
  14. vjcyrano

    $1 not set by regexp in loop

    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)...
  15. vjcyrano

    $1 not set by regexp in loop

    use chomp($line); it should work.. worked for me..
  16. vjcyrano

    how to read consective lines from a file

    $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]...
  17. vjcyrano

    Unexpected query result

    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 ?
  18. vjcyrano

    my $small_string = substr ($_, 168, 6); SUBSTR

    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.
  19. vjcyrano

    my $small_string = substr ($_, 168, 6); SUBSTR

    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...
  20. vjcyrano

    need explanation on some code to do with hashes and references. TY

    $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...

Part and Inventory Search

Back
Top