in reply to Re: help on searching a file
in thread help on searching a file

Try making the following additions and reporting the results:

use Data::Dumper; ... $pessoais = "produtos/pessoais.dat"; $mailprog = '/usr/sbin/sendmail'; $search_for = "a"; $search_field = "all"; &search_database($pessoais,$search_for); $count = @results; print '@results= ',Dumper(\@results); ... ... foreach $results (@results){ ($key,$description,$speed,$ref,$qid) = split(/\|/,$results); print '($key,$description,$speed,$ref,$qid)= ', Dumper($key,$description,$speed,$ref,$qid); print MAIL "$description $FORM{$qid}\n\n"; } print '%FORM= ', Dumper(\%FORM); ...
        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
RE: RE: Re: help on searching a file
by tye (Sage) on Sep 12, 2000 at 23:23 UTC

    DaWolf mentioned that this didn't work on the web server which probably means that they are running an old version of Perl that didn't come with Data::Dumper. So here is a modified version that works on really old versions of Perl:

    require "dumpvar.pl"; ... $pessoais = "produtos/pessoais.dat"; $mailprog = '/usr/sbin/sendmail'; $search_for = "a"; $search_field = "all"; &search_database($pessoais,$search_for); $count = @results; print '@results:',"\n"; dumpValue(\@results); ... ... foreach $results (@results){ ($key,$description,$speed,$ref,$qid) = split(/\|/,$results); print '($key,$description,$speed,$ref,$qid):',"\n"; dumpValue([$key,$description,$speed,$ref,$qid]); print MAIL "$description $FORM{$qid}\n\n"; } print '%FORM= ',"\n"; dumpValue(\%FORM); ...
            - tye (but my friends call me "Tye")