Question about OUTFILE?

2003-11-02 Thread Mark Weisman
Hey all, I'm trying to read from a file, copy it's contents to another file, then overwrite the first file. >open (INFILE, "@array1 = ; >close(INFILE); >foreach my $rec (@array1) { chomp($rec); ($x,$y,$z) = split(/\|/,$rec); if ($y ne "AK") {

Re: Question about OUTFILE?

2003-11-02 Thread Rob Dixon
Mark Weisman wrote: > > I'm trying to read from a file, copy it's contents to another file, > then overwrite the first file. > > open (INFILE, " @array1 = ; > close(INFILE); > > foreach my $rec (@array1) { > chomp($rec); > ($x,$y,$z) = split(/\|/,$rec); > if ($y ne "AK") { #this leaves one re

Re: command-line

2003-11-02 Thread Jerry Rocteur
On Saturday, Nov 1, 2003, at 18:40 Europe/Brussels, Jeff Westman wrote: SilverFox <[EMAIL PROTECTED]> wrote: hey guys, i'm trying to grep some data from a log file and getting the following error. Any ideas??? [EMAIL PROTECTED] perl -e 'grep \"Eliminating movie\" update.log |awk {'print \$5'}';

Re: Recursion

2003-11-02 Thread Rob Dixon
Jeff Westman wrotenews:[EMAIL PROTECTED] > Hi, > > I've never liked "recursion" but of course there are times where it is > needed. > > I have a simple task that I am trying to do. Basically, I just want to list > out my directories on disk, and then chdir to each one, print it out, and so > on.

RE: Face lift survey

2003-11-02 Thread Yannick Warnier
Le dim 02/11/2003 à 04:58, Charles K. Clarkson a écrit : > Not to mine, Bucko! I am always right and disagreeing > with me will lead to dire consequences. I hear you well, I won't comment on this, just put it aside and go carefully check the references before I begin the next project. Thanks

Matching Over Linefeed and Space

2003-11-02 Thread Clint
I'm trying to scrape a section of html and don't see why my regexp stopped working this week. The relevant two-line sample section from http://www.srh.noaa.gov/data/forecasts/SCZ020.php is: Barometer: 30.22" (1023.1 mb) (notice the space before ) My Perl segment (that was working until this

Re: Matching Over Linefeed and Space

2003-11-02 Thread Wiggins d'Anconia
Clint wrote: I'm trying to scrape a section of html and don't see why my regexp stopped working this week. The relevant two-line sample section from http://www.srh.noaa.gov/data/forecasts/SCZ020.php is: Barometer: 30.22" (1023.1 mb) (notice the space before ) My Perl segment (that was workin

Re: Matching Over Linefeed and Space

2003-11-02 Thread Clint
That fixed it! Thank you very much! Clint Wiggins d'Anconia wrote: Clint wrote: I'm trying to scrape a section of html and don't see why my regexp stopped working this week. The relevant two-line sample section from http://www.srh.noaa.gov/data/forecasts/SCZ020.php is: Barometer: 30.22" (102

Re: Recursion

2003-11-02 Thread R. Joseph Newton
Rob Dixon wrote: > Jeff Westman wrotenews:[EMAIL PROTECTED] > > Hi, > > > > I've never liked "recursion" but of course there are times where it is > > needed. > > > > I have a simple task that I am trying to do. Basically, I just want to list > > out my directories on disk, and then chdir to each

Editing Ogg and Mp3 ID3 tags

2003-11-02 Thread Dan Anderson
I'm looking for a Perl module to allow me to read and edit ID3 tags for OGG and Mp3 files. Can anyone recommend one? Thanks in advance, Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Need help speeding up an algorithm...

2003-11-02 Thread Dan Anderson
I created a pretty simple Perl script to create .m3u files for all genres in my music library. (I eventually want to expand the script to be able to create music match like playlists on the fly). The problem I'm running into is that for only 150 songs the following code takes over 5 seconds to ex

Re: Need help speeding up an algorithm...

2003-11-02 Thread Paul Johnson
On Sun, Nov 02, 2003 at 05:46:22PM -0500, Dan Anderson wrote: > I created a pretty simple Perl script to create .m3u files for all > genres in my music library. (I eventually want to expand the script to > be able to create music match like playlists on the fly). > > The problem I'm running into

Re: Editing Ogg and Mp3 ID3 tags

2003-11-02 Thread Wiggins d'Anconia
Dan Anderson wrote: I'm looking for a Perl module to allow me to read and edit ID3 tags for OGG and Mp3 files. Can anyone recommend one? Check out MP3::Info: http://search.cpan.org/~cnandor/MP3-Info-1.02/Info.pm Which I have used, I don't know that it supports OGG files, for those you might hav

Re: Matching Over Linefeed and Space

2003-11-02 Thread R. Joseph Newton
Clint wrote: > I'm trying to scrape a section of html and don't see why my regexp > stopped working this week. The relevant two-line sample section from > > http://www.srh.noaa.gov/data/forecasts/SCZ020.php > > is: > > Barometer: > 30.22" (1023.1 mb) > > (notice the space before ) > > My Perl

Re: Recursion

2003-11-02 Thread James Edward Gray II
On Sunday, November 2, 2003, at 06:19 AM, Rob Dixon wrote: File::Find would do it for you, but the revursion is very simple really: use strict; use warnings; printdir('/usr'); sub printdir { my $dir = shift; opendir DIR, $dir or die $!; my @dirs = grep /[^.]/, readdir DIR; I

Re: Matching Over Linefeed and Space

2003-11-02 Thread Steve Grazzini
On Sun, Nov 02, 2003 at 03:25:59PM -0800, R. Joseph Newton wrote: > Clint wrote: > > sub barometer { > > local $_ = shift; > > Don't do that. You are not using the default variable in the > code at all, and it is a bad habit to be routinely tweaking > system variables. What benefit did you

Re: Need help speeding up an algorithm...

2003-11-02 Thread Andrew Gaffney
Paul Johnson wrote: On Sun, Nov 02, 2003 at 05:46:22PM -0500, Dan Anderson wrote: I created a pretty simple Perl script to create .m3u files for all genres in my music library. (I eventually want to expand the script to be able to create music match like playlists on the fly). The problem I'm run

Re: Recursion

2003-11-02 Thread James Edward Gray II
On Sunday, November 2, 2003, at 06:19 AM, Rob Dixon wrote: Jeff Westman wrotenews:[EMAIL PROTECTED] Hi, I've never liked "recursion" but of course there are times where it is needed. I'm not sure I would say recursion is "needed", but it sure makes some things simpler. I've never met a recursi

Re: Recursion

2003-11-02 Thread Steve Grazzini
On Sun, Nov 02, 2003 at 05:32:35PM -0600, James Edward Gray II wrote: > On Sunday, November 2, 2003, at 06:19 AM, Rob Dixon wrote: > > sub printdir { > > > >my $dir = shift; > > > >opendir DIR, $dir or die $!; > >my @dirs = grep /[^.]/, readdir DIR; > > I'm not sure this grep() is wha

Re: Need help speeding up an algorithm...

2003-11-02 Thread Jeff 'japhy' Pinyan
I have a possible re-write for your program. It gets rid of the system calls (the 'find' and the 'rm'). I've used references; the %by_genre hash has the different genres as keys, and its values are array references. The array references hold hash references. If you can't follow the code, ask the

Re: How do I install DBD modules

2003-11-02 Thread R. Joseph Newton
Dan Anderson wrote: > If I download DBD modules for DBI off CPAN, what is the directory I > should put them in so they can be used by all perl scripts on the > system? Don't do that. Use the CPAN utility built into Perl. [if your on Windows, try ppm first]. Downloading then installing by hand