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") {
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
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'}';
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.
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
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
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
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
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
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]
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
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
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
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
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
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
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
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
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
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
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
21 matches
Mail list logo