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 Mike Lewis 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. shezam

    Compression Compress::Zlib

    Perl dummy here. I need to use Compress::Zlib > http://www.xav.com/perl/site/lib/Compress/Zlib.html DEFLATE to write the contents of an array i.e "@data" to a .gz file. Been reading the syntax but I'm little lost. Can the $output be a .gz file. Anyone with any suggestions greatly appreciated.
  2. shezam

    Concatenate files

    open(GZIP, "|gzip > output.gz") || die("Cannot launch gzip"); print GZIP @files; close(GZIP); This doesn't appear to compress the data into a file. Is there any way i can may doing it using a command enclosed in backticks
  3. shezam

    Concatenate files

    Ok here goes; open(FILE1,"file1" ) || die("Cannot Open File1"); open(FILE2, "file2" ) || die("Cannot Open File2"); open(FILE3, "file3" ) || die("Cannot Open File3"); my @files; my $delimiter = "\del\n"; push(@files, <FILE3>,$test,<FILE2>,$test,<FILE1>); close (FILE1); close (FILE2); close...
  4. shezam

    Concatenate files

    Can the output be a gzipped file, so concat file1.txt and file2.txt and create files.gz.
  5. shezam

    Concatenate files

    I want to write a little piece of perl that will take file1.txt, and file2.txt and concatenate them using /del as the delimiter. So how would i do this?, read file1.txt, append /del at after last line and then append file2.txt after that. All suggestions appreciated! Thanks!
  6. shezam

    Perl Script

    With finddepth the syntax says; use File::Find; finddepth(\&wanted, @directories_to_search); sub wanted { ... } %options The first argument to "find()" is either a code reference to your &wanted function, or a hash reference describing the...
  7. shezam

    Perl Script

    Im writing a perl script to delete data based on wether I find certain data. Let me explain. Inside the following dir "/spare/data/sample/" there are 5 levels of 6 directories from A-F like so so inside /spare/data/sample is A B C D E F and inside that is the same and so on. At the very...
  8. shezam

    ,htaccess DirectoryIndex

    eek found the answer, need the following in my .htaccess file; AddHandler cgi-script .cgi Options +ExecCGI Can I remove this thread and if so how?
  9. shezam

    ,htaccess DirectoryIndex

    I have a test webserver with a directory test for example - http://www.example/test Im using the .htaccess file and setting "DirectoryIndex om.cgi". om.cgi is a perl script which just returns a 404 Not found; #!/usr/bin/perl #Read request headers $user_agent = $ENV{"HTTP_USER_AGENT"}...
  10. shezam

    Read body of http request

    I have done the following,the logic seems right but it doesn't work; $content_length = $ENV{"HTTP_CONTENT_LENGTH"}; $method = $ENV{"REQUEST_METHOD"}; if ($method eq "POST") { read(STDIN, $buffer, $content_length); } open FH, "> /test/doc.txt"; print FH $buffer; close FH; } The file doc.txt...
  11. shezam

    Read body of http request

    I have a test webserver, i want to write a script to check what headers are being passed in the request and send back a 302 if all headers are present, but i also want to get the body of what was sent in the request and write it to a file - how do i do this? My code for checking headers...

Part and Inventory Search

Back
Top