Thank you, until here I know how to do it, but I don't know how to sort the
lines by artist, band, etc.

Can you give me some hints?
It would be very nice to be so simple.

Thanks.
Teddy,
My new email address is [EMAIL PROTECTED]

----- Original Message -----
From: "Scot Robnett" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, April 07, 2002 6:32 PM
Subject: RE: Do I need MySQL?


No. MySQL would be overkill for an application like this unless you're
talking about several thousand lines. Otherwise you can just use something
like...

my $foo = "/path/to/file";
open(INFILE,"<$foo");
my @records = <INFILE>;
close(INFILE);
for(@records) {
 chomp;
  my ($rec,$band,$artist) = split(/,/,$_);
  print "Band = $band \n";
  print "Artist = $artist \n";
 }



-----Original Message-----
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 07, 2002 8:39 AM
To: [EMAIL PROTECTED]
Subject: Do I need MySQL?


Hi all,

I want to read and sort a comma separated file like:

abc,Metallica,Larry
bcd,Megadeth,Wall
cde,Ozzy,Perl

I want to be able to sort the line using all the 3 columns.
I am a beginner in Perl and I don't know to use MySQL yet.
Is it possible to do what I want without a database?

Thank you!
Teddy,
My new email address is [EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/02

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/02



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to