Hey all,
I'm looking for some sort of Perl package or distribution that provides FTP functionality via a web interface. I figured this sort of thing would be all-pervasive, but I'm having a bit of trouble finding exactly what I'm looking for. Maybe I'm just not looking for the right thing.
I...
Hey folks, an easy one- how do I download binary files through a URL? I know how to use LWP::Simple to "get" a web document, but if the file is binary it doesn't read it properly.
IE, want to use Perl to automate the downloading of a .zip file, at http://www.someaddy.com/myfile.zip. How do...
...is it possible? Seems like this wacky OLE module that I've never used can open Word and manipulate files within the program, but I'd prefer to keep things simple and parse some .doc files within the warm, comfortable confines of my Perl script, without opening any helper programs. CPAN...
Hey all, kind of an easy question. I have a perl script which I've compiled into a .exe. When I execute it, it naturally sets its directory to the one the .exe is found in. This is fine. However, I want to know exactly what this directory is. For example, my script (.exe) file is under...
I'm stumped (again):
open(OUTPUT, "> tester.txt");
print OUTPUT "hello\n";
open(STDERR, "> tester.txt");
die "123456789ThisIsMyErrorMessage";
This produces a file containing the following:
hello
89ThisIsMyErrorMessage at C:\ProjectsListExport\Scripts-7-15-04\webExporterModules\printLog.pm...
Anyone know of a good FAQ or tutorial on Perl scope? It eludes me. C++ has a wonderful system of private and public data/functions, something which is greatly forced in Perl: you've got to use the Exporter module, and even then, use strict won't allow you to create "global" variables so making...
k Gurus, this is driving me crazy. Perhaps there is an obvious, logical explanation for this but I don't see one. I have a script:
sub myFunction {
print "hello.";
}
{ package myPackage;
myFunction();
}
Says it can't find the function myPackage::myFunction. MAIN::myFunction doesn't...
Hey Perlies,
A simple question: how do I include all modules in a directory with one command? Lets say I have a directory called /MyModules, which contains an unknown number of libraries. I want all of them. "use MyModules;" obviously doesn't work. Is there a solution? Or do I have to...
Hey folks, slightly tricky one for ya. I'm using Perl to take a bunch of information from one workbook, and put it in several others. I'm fairly proficient in using the CPAN WriteExcel/ParseExcel modules. The problem is, every sheet in every workbook I'm creating needs to be built from a...
Hey folks,
I'm on a wireless network supported by a Linksys router (I don't have the model number handy, but will get it if necessary). Basically the connection is fine, except for when I'm gaming--specifically, the Desert Combat mod of Battlefield 1942. I can connect to the servers no...
Hey all, variable question that I'm sure has been asked before in some form: how do I determine what type a variable is? I'm passing a subroutine arrays and strings, but I don't know how many strings or how many arrays, nor do I know what order they're coming in. So, I have:
sub sample {
my...
Hey all,
I have a fairly simple issue. I'm passing a subroutine an unknown number of variables in groups of three. For example, I might be passing it:
mySub($hello, 5, $goodbye, 'asdf', 6, 'fdsa');
or
mySub('asdf, 6, 'fdsa');
I figured I'd be slick and arrange the function to take the...
Ok all you smart people, here's one. I want:
my $bob = 'bob$$$';
if('BOB$$$' =~ /$bob/i) {
die "happy";
} else {
die "sad";
}
to die happy. The ignore case flag (/i) seems to freak out when it sees $$$. It doesn't crash, mind you; it just doesn't pass. If I define bob as:
my $bob =...
I've encountered a curious problem in both Multiedit and Crimson Editor with Perl's "die" function. When I run a script that prints (say, listing filenames as its processing them), a frame pops up in the bottom of the screen, showing me what's in the STDOUT as it comes up--which is fine and...
Hello,
Here is a simple regular expression that isn't working quite like I would expect. I think I know what's going on, but I'm not sure if I like it ;)
my $string = "/hello/this/is/my/folder/file.txt";
$string =~ /\/(.*?)$/;
print $1;
Notice that I'm grabbing as little as possible with...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.