Re: mkpath

2006-01-13 Thread Jeremy Mates
* Andrew Brosnan [EMAIL PROTECTED] I'm using File::Path's mkpath() function in a script run by Apache on Mac OS X 10.3 and Perl 5.8.1. It works fine when only creating a single directory, but as soon as it tries to create more than one directory level, it fails. Below is the relevant code and

Re: CGI to OS X?

2005-11-05 Thread Jeremy Mates
* Sherm Pendley [EMAIL PROTECTED] A finer-grained method, supported by Perl 5.8.x and newer, is to use the DESTDIR option when installing. You need to download and build the modules by hand, beginning with the normal recipe - perl Makefile.PL; make; make test. Why hand install modules when

Re: CGI to OS X?

2005-11-05 Thread Jeremy Mates
* Sherm Pendley [EMAIL PROTECTED] A finer-grained method, supported by Perl 5.8.x and newer, is to use the DESTDIR option when installing. You need to download and build the modules by hand, beginning with the normal recipe - perl Makefile.PL; make; make test. There is no need to hand install

Re: Perl equivalent of who command?

2005-11-01 Thread Jeremy Mates
* James Reynolds [EMAIL PROTECTED] I've been running the shell command in backticks, but if I can get a Perl way, I would be much happier. Minus a module to do this on CPAN, you get to parse the binary /var/run/[wu]tmp files for the information, whose format is documented in: man 5 utmp I

ruminations on 'ps' commands

2005-10-14 Thread Jeremy Mates
* Peter N Lewis [EMAIL PROTECTED] ps auxw | grep inevitably finds the search command unless you use a trick like the above, or: ps auxw | grep | grep -v grep Or, utterly off topic, the clever regex method, which may run afoul of quoting rules in certain shells, but is quicker

Re: Cpan problems - check all directory permissions, sudo -H

2005-03-05 Thread Jeremy Mates
* Phil Dobbin [EMAIL PROTECTED] You could always try chmod'ing to 755 /Users/emma/y/sources/authors/ (i.e. your local CPAN directory). The permission problem might exist in a parent directory; for a complete test, check each directory. This can be automated with a tool like 'parsepath':

Re: Heredoc

2005-02-18 Thread Jeremy Mates
* Christopher L. Filkins [EMAIL PROTECTED] I'm looking for the perl equivalent of a heredoc declaration. For some reason I can't recall how. In php it would work like this: my $foo = EOD; Stuff stuff stuff EOD

Re: Heredoc

2005-02-18 Thread Jeremy Mates
* Chris Devers [EMAIL PROTECTED] Doesn't that look so much easier than heredoc syntax? You can pick whatever quot delimiters work best for the output of the moment, you don't have to keep track of the fiddly TOKEN; syntax, you don't get tripped up if the closing quote has *gasp* proper

Re: Generating a temp file in a web app

2004-01-23 Thread Jeremy Mates
* Adam Witney [EMAIL PROTECTED] my $temp_pdf = /tmp/reg_form$$.pdf; to name the temporary pdf file... Is this a safe way to approach the problem. This will not be a heavily used app... But I wouldn't want one persons pdf to be sent to another user.. Writing temporary files under /tmp using

Re: Solution: Getting my WAN IP address from ppp0 and upload via ftp

2004-01-06 Thread Jeremy Mates
* Stephan Hochhaus [EMAIL PROTECTED] I just finished a very simple script that reads out my IP-address from the ppp0 device, creates a small HTML file and uploads it to my webhoster so i can access my g4 from anywhere in the world. The script is the patchwork of a beginner, so any advice on

Re: CPAN broken in Panther

2003-11-25 Thread Jeremy Mates
* Hannes [EMAIL PROTECTED] but it only skips the initial retrieval errors, and just copying all perl modules in the .cpan directory outside of CPAN just to install them from the cpan shell doesn't seem to be the solution. I know that lynx, wget, ftp etc are working outside of cpan Sounds

Re: File Writing and CGI

2003-11-21 Thread Jeremy Mates
* Thilo Planz [EMAIL PROTECTED] - use strict And taint mode! perldoc perlsec - close the file when done And check the exit status of the close on the written file, as that is when you learn when the disk is full or whether subsequent processing on the file should be avoided due to possible

Re: File Writing and CGI

2003-11-21 Thread Jeremy Mates
* Chris Devers [EMAIL PROTECTED] Putting everything together, try something like this: #!/usr/bin/perl -wT # clean up env for taint mode sub BEGIN { delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; $ENV{'PATH'} = '/bin:/usr/bin'; } use strict; use CGI::Carp qw[ fatalsToBrowser ];

INSTALLSITEMAN[13]DIR fixes for Panther to prevent /man documentation installation and additional ruminations

2003-11-16 Thread Jeremy Mates
* Vic Norton [EMAIL PROTECTED] The default shell for Panther is bash. I had become accustomed to tcsh under Jaguar. That is part of my problem. I'm trying to go with bash under the new system. IM(NS)HO, zsh has more tcsh compatibilities, while not suffering from the various deficiencies that

Re: Ordering keys in a hash

2003-08-14 Thread Jeremy Mates
* Ken Y. Clark [EMAIL PROTECTED] I don't know how many values you need to sort, but it's probably advisable to use a Schwartzian Transform. Here's my suggestion: Which in turn may be slower than a new sorting method: http://www.sysarch.com/perl/sort_paper.html Sorting can be a major

Re: CPAN Newbie: when to sudo?

2003-03-16 Thread Jeremy Mates
* Chris Devers [EMAIL PROTECTED] Still, that is an interesting way to do... just in time sudo rights. OpenBSD does this for their src and ports system; setting SUDO=sudo in the /etc/mk.conf causes the Makefiles that control the installation of software to do the install steps via sudo. A quick

Re: [Really OT] More Terminal/Finder cooperation

2003-03-01 Thread Jeremy Mates
To reveal files in the Finder, the nifty open(1) command is faster than osascript and supports multiple files easily. Use a shell script or shell function such as the following. I called it rif and placed it under the ~/bin/`uname` directory to avoid the script being in the command path on other