K
kielhd
Hi NG,
I would like to access a cd-rom and read the mp3-tags of the mp3-files
on the cd.
My problem seems to be that the files on the cd have a read-only flag.
The script gives me the following message:
Can't open E:\Bush - Razorblade Suitcase\02 - Greedy Fly.mp3:
Permission denied at C:/Perl/site/lib/MP3/ID3v1Tag.pm line 83.
The modul I am using looks like this around line 83 :
76 ## Constructor for Object of Module
77 sub new {
78 my($class,$mp3_file,$readonly) = @_;
79 my $self = {};
80 $readonly = 0 unless defined($readonly);
81 $self->{FileHandle} = new IO::File;
82 if( -w $mp3_file || !$readonly) {
83 $self->{FileHandle}->open("+<${mp3_file}") or (warn("Can't
open ${mp3_file}: $!") and return undef);
84 $self->{readonly} = 0;
85 } else {
86 $self->{FileHandle}->open("<${mp3_file}") or (warn("Can't open
${mp3_file}: $!") and return undef);
87 $self->{readonly} = 1;
88 }
89 $self->{filename} = $mp3_file;
90 $self->{tag} = ();
91 bless($self, ref $class || $class || $DefaultClass);
92 my $initialized = $self->init();
93 return $self;
94 }
Can somebody help me?
TIA, Henning
I would like to access a cd-rom and read the mp3-tags of the mp3-files
on the cd.
My problem seems to be that the files on the cd have a read-only flag.
The script gives me the following message:
Can't open E:\Bush - Razorblade Suitcase\02 - Greedy Fly.mp3:
Permission denied at C:/Perl/site/lib/MP3/ID3v1Tag.pm line 83.
The modul I am using looks like this around line 83 :
76 ## Constructor for Object of Module
77 sub new {
78 my($class,$mp3_file,$readonly) = @_;
79 my $self = {};
80 $readonly = 0 unless defined($readonly);
81 $self->{FileHandle} = new IO::File;
82 if( -w $mp3_file || !$readonly) {
83 $self->{FileHandle}->open("+<${mp3_file}") or (warn("Can't
open ${mp3_file}: $!") and return undef);
84 $self->{readonly} = 0;
85 } else {
86 $self->{FileHandle}->open("<${mp3_file}") or (warn("Can't open
${mp3_file}: $!") and return undef);
87 $self->{readonly} = 1;
88 }
89 $self->{filename} = $mp3_file;
90 $self->{tag} = ();
91 bless($self, ref $class || $class || $DefaultClass);
92 my $initialized = $self->init();
93 return $self;
94 }
Can somebody help me?
TIA, Henning