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 TouchToneTommy 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. yauncin

    I copied this code out of the FAQ s

    the error you are getting is due to the fact you are using 'use strict' ... you have to declare all variables... so you need to add this line: [COLOR=blue]my %file1hash;[/blue] before you use it (also make sure its not in any blocks).
  2. yauncin

    <!--#exec cgi="http://www.oursite.org/cgi-bin/ptslog.cgi"-->

    what webserver is the machine running?
  3. yauncin

    Attachments in perl

    and then there are the simple interfaces that utilize NET::SMTP the modules Mail::Mailer and Mime::Lite.....
  4. yauncin

    Array of Hashes

    you can do this: my %temp; %temp = %{$sortedPast[$i]}; %{$sortedPast[$i]} = %{$sortedPast[$z]}; %{$sortedPast[$z]} = %temp;
  5. yauncin

    ksh to perl??

    thats weird i've created bash cgi scripts before....
  6. yauncin

    UK - Email to be read by anyone other than recipitant

    PerryMC wrote: Isn't privacy taken too far anyway, if you're not doing anything you feel guilty about, why would you care who knows about it? It allows all the scum, whether they are floating on the top of the pond of humanity or sliming along on the bottom to get away with far too much. What...
  7. yauncin

    ksh to perl??

    Sorry... here is an explanation. The client's browser is expecting 'header' information. The 'content-type: text/html' lets the browser know what type of information is being sent. There is other header info you can send also, but the above info is all you need to print to the browser.
  8. yauncin

    ksh to perl??

    you could have just added this to the shell script. where you have: function HEADER { echo &quot;<html> do this: function HEADER { echo &quot;content-type: text/html <html>
  9. yauncin

    How to delete an item from a text file

    A couple of things to be aware of: my $ip = <STDIN>; $ip will also hold a newline character at the end of the string. You can get rid of it with chomp $ip;. Also, when you: @file = <FILE>; each element of @file will also contain a newline character at the end. You can get rid of them with...
  10. yauncin

    How to delete an item from a text file

    At the end of your code: DeleteIt($ip); 'ipdrop $ip off'; <- Is this a typo? $SIG{CHLD} = 'IGNORE';
  11. yauncin

    problems using MIME::Lite

    It would seem you also need to get LWP/UserAgent.pm
  12. yauncin

    Adding a file to an array, but this code is not good

    I assume you are using perl. why not just do this foreach $temp_file (@ls) { foreach $notthisfile (@excludefiles) { unless ($temp_file eq $notthisfile) { #code here } } }
  13. yauncin

    length of array not understood

    and since you can force an array into a scalar context its conceivable to do this: print my $num = @array; heh
  14. yauncin

    Perl and Access

    No.. but if you want an example: http://www.mvps.org/access/general/gen0022.htm
  15. yauncin

    Prem. end of script headers error...

    open the file from the command line like so: vi -b file.cgi If you see a lot of ^M then you need to get rid of them. *nix machines use newlines (\n in perl) for line deliminators and windows uses carriage return linefeeds (\n\r in perl or is it the other way around). So you can do something...
  16. yauncin

    Learning Python

    Yeah I figure that perl is the only scripting language I will need... well besides bash shell scripting. I had to learn VB for my previous job and that wasn't much of a good time.. as a language I think it is bad. I've moved on to C and C++ (which I love) for my current job and I'm having to...
  17. yauncin

    Using a config file with Perl program

    you can do something like this --config file-- somefile.config name=john doe address=5555 some road city=new york state=new york zip=55555 --perl script-- #!/usr/bin/perl -w use strict; my %config; open CONFIGFILE, 'somefile.config'; while (<CONFIGFILE>) { next if /^\s+$/; my($key...
  18. yauncin

    Extract from a list and a file

    yeah sorry about that... GIGO... he seems to be missing one too i just cut and pasted.... i meant; for ($i=0; $MYLIST[$i]; $i++) { if ($MYLIST[$i] eq $fldName) { print &quot;$MYLIST[$i]&quot;; next LINE; } } it doesn't really matter since his code should work (well...
  19. yauncin

    ASCII values in perl????

    unless you just want to do this yourself there are a lot of encryption modules already. And theres always the crypt function but i'm not sure it works under windows.
  20. yauncin

    Extract from a list and a file

    try: for ($i=0; $MYLIST[$i]; $i++) { if ($MYLIST[$i] eq $fldName){ print &quot;$MYLIST[$i]&quot;; next LINE; } qw() stands for quote words. instead of @array = ('this', 'that', 'theother'); you can do @array = (this that theother); lets you be just a little more lazy.

Part and Inventory Search

Back
Top