Hello Ricardo,

At 12:57 PM 9/19/2001 -0300, Ricardo Derbes wrote:
>I dont think it can be opened, 

Not quite correct.  Let's say the file is called cpan.iso.  Here's how you
can print the first "word characters" within the first 33000 bytes of the
file:

#!/usr/bin/perl -w
use strict;
my ($string, $length, $char);
open (ISO, "cpan.iso") or die;
$length = read (ISO, $string, 33000);
close(ISO);
for(my $i=0; $i < $length; $i++) {
  $char = substr($string, $i, 1);
  print "$i: $char\n" if $char =~ m/\w/;
}

>itīs an image of an ISO9660 filesystem...

Correct.

>Bat you can easily transfer it to a CD, using Nero or other burning
>software...
>Itīs cheaper :)

Here's a neat trick you can do in Linux:
    mkdir /mnt/iso.loopback   # creates a mountpoint directory
    mount -o loop <iso image file> /mnt/iso.loopback

By mounting the iso image, you can treat the folder /mnt/iso.loopback just
like it was any other filesystem.

For  example, let's say the image file is called cpan.iso and is in
/var/ftp/pub/perl.  In this way the iso image is available on your public
ftp server.  However, some of your ftp users don't need the entire iso but
would rather have just a few files.  So you decide to make the files from
the iso also available.  How do you do this?  You could create a CD and
then copy the files into /var/ftp/pub/perl/cpan.  Of course, you would need
twice as much space on your harddrive in addition to a CD burner, a blank
CD, and CD burning software.

Or you could do this:
  mkdir /var/ftp/pub/perl/cpan
  mount -o loop /var/ftp/pub/perl/cpan.iso /var/ftp/pub/perl/cpan

Muy facil, no?

Regards,
- Robert


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

Reply via email to