|
gunzip stdin stream? I have a convenient way to open possibly gzip'ed files: open(F, ($f =~ m/\.gz$/) ? "gunzip -c $f |" : "$f"); So, if the file name ends in .gz I send it through gunzip. So far, so good. (I don't want to use the PerlIO:Gzip module because it's not installed by default, so it's a hassle.) But now, my script ... 24 Jan 2006 11:40
FTP PUT with proxy? I've been struggling with this forever now. Hopefully someone can help Lets say you have the following: proxy server: my.proxy.com proxy username: proxyuser proxy password: proxypassword ftp server: my.ftp.com ftp username: ftpuser ftp password: ftppassword file to PUT:... 24 Jan 2006 14:49
How to read a perl script from withink itself Hi: Does anyone know how to read a perl script from within itself? Basically, I have a script that contains a version number that I would like to output to a log file, but I need to output that from the script itself, so I need to read it while the script is running. Is there any way to do this? Thanks. ... 11 Jan 2006 21:52
Perl Integer Length Hi, I am encountering an unusual problem. I have a perl script that adds the sum of all 6 digit integers in a file. The problem is that ever so often the sum exceeds the maximum allowable limit for integer size. When that happens the program appends a '-'ve sign to the sum and starts to subtract the numbers rath... 6 Jan 2006 11:58
using LWP to POST data via "javascript:document.form.submit()" link Hello. Can anybody solve this problem? I need to POST data to a HTTPS login script that doesn't have a standard "submit" button. The form appears to use javascript to submit the document via the browser. <form action='loginScript.cgi' method="post" name="loginForm"> <input name="userid" /> ... 10 Jan 2006 16:36
How to declare a variable??? I'd like to define a large hash at the end of the script file. The hash contains some parameters. But I need to use this hash variable at the beginning of the script file. The hash is very long, so it's impossible for me to put it at the beginning of the script. Do I need to declare it at the beginning of t... 22 Dec 2005 05:13
finding maximum element in an array recursively hello, can someone show me other ways to find the max. element in an array recursively? Other than shown in the code below? (for educational purposes). I can imagine that it is not the best way because of memory usage. use strict; use warnings; #Author: Feyruz Yalcin/Groningen/Netherlands #Algorithmica Exer... 30 Nov 2005 17:21
Perl - Get Two Decimals Hi all, I was wondering if it is possible in perl to get a number to have exactly two decimal places (like xx.xx). I read about Number::Format, but that is not available for me to use. I also know you can do a printf to display it, but I need it to be like that in the variable. i.e. if someone enters in 12.... 27 Nov 2005 22:27
How to Remove Space in text file Hi I have data $seq = ABCHDJJKOLEUOEJLDXJFXLJLCXJFLDFJDFUPD ASJKDJIUEOFJLDFJOFUEOF DNBKASCDFHIEFYHKHCAKDFHDGTAAAACAC TATCAACAAACATTTTCAT This is one sequence and I Want to remove Enter Space from in it I am using Regular Expraision ($seq =~ s/\n\s /sg); But its reading just first line. I donot know why? Can ... 22 Nov 2005 09:20
s///x I was trying the s///x syntax and got unexpected results. Somebody cares to explain? Simplified example: #!/usr/bin/perl use warnings; use strict; local ($,, $\) = ("\t", "\n"); my $x; $_ = "abc 123 def 123 ghi"; $x = s/ # Replace 1 # ONE 2 ... 4 Nov 2005 18:36 |