Re: [Perl-unix-users] Re:MP3::Info

2002-04-02 Thread Bayard Bell
It's a hash ref. RTFM. The perlref page specifically. Captain Howdey wrote: > > > You're getting the right think back. The docs say get_mp3tag returns > a > > hash reference, to get to the tag try (see perldoc MP3::Info and look > > for get_mp3tag): > > > > my $tag = get_mp3tag('myson

Re: [Perl-unix-users] File age

2002-09-04 Thread Bayard Bell
>From perldoc for the stat function (as opposed to the OO interface available via file::stat): 8 atimelast access time in seconds since the epoch 9 mtimelast modify time in seconds since the epoch 10 ctimeinode change time (NOT creation time

Re: [Perl-unix-users] setting environmental variables

2002-11-06 Thread Bayard Bell
This can't work. Perl is running as a child process. Parents can't inherit the environments of their children. Environment settings can only be propagated to children. Torbjørn Lindahl wrote: > > Hi list, > > how can I set an environmental variable from within perl - so that it will > be vali

Re: [Perl-unix-users] Installing a new module

2002-11-07 Thread Bayard Bell
This is very much an issue of the way your Unix environment is built. You can always build a module in your home directory for testing, but running production code with a dependency on your home directory is arguably a very broken dependency. If you need to use the module out of your home directo

Re: [Perl-unix-users] How do one determine the amount of memory used by an process within perl

2003-03-18 Thread Bayard Bell
"How" to do this? That request doesn't necessarily make sense in a platform-independent context, and it only gets you somewhere on a given platform if you understand something about memory allocation for that platform. Most modern Unixes make a distinction between text pages or shared memory map

Re: [Perl-unix-users] How to keep Perl in sync over a large number of servers?

2003-03-21 Thread Bayard Bell
We use AFS as a replicated file system for consistent distribution of software and operating system to several thousand machines. Works like a charm -- our implementation gives us great stuff like module version management and transparent macros for ABI/OS-specific content access under a single na

Re: [Perl-unix-users] how to set the @inc permanently

2003-06-03 Thread Bayard Bell
There is no way more permanent than "use lib". You can set $PERL5LIB for a given user in the environment files sourced by a user's shell, or you can modify the PERL5LIB built into a particular interpreter as a compile-time option. Neither insures that the execution of the script uses the same pat

Re: [Perl-unix-users] How to recurse through a directory and do somethingwith each file

2003-08-14 Thread Bayard Bell
use File::Find (); &File::Find::find sub { if ( -f $_ ) { &do_something("${File::Find::dir}/$_") or warn qq{Could not do_something() to "${File::Find::dir}/$_: $!"\n}; # does &do_something to the file in passing the absolute path. File::Find will change your cwd to do the find, so you cou