in reply to Search function not working from CD Rom

If you run a program on your hard disk (say C:) to access a CD rom (say E:) I fail to see how you can use a relative path as you need to specify the E: - there simply is no relative path from C: to E: This being the case I suggest your exe perhaps has a hard coded CD rom drive letter in it (given it works from the HDD). You almost certainly have a path issue.

A script can work out where it is (ie if on the CD rom what the drive letter is) by using Cwd. This should help fix your problem.

use Cwd; my $cwd = cwd(); my ($cdrom_drive_letter) = $cwd =~ m/^(\w:)/;
cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Search function not working from CD Rom
by Gerard (Pilgrim) on Jan 06, 2003 at 00:36 UTC
    Sorry if I did not make it clear. When on the hard disk the files are being opened from the hard disk and when the program is on the cd the files are being opened from the cd. All paths are relative apart from the 1 saying where the temp directory is. The directory structure is identical on the hard disk(well not the whole hard disk, but the relevant parts anyway) to the cd. Regards, Gerard

      It's not something like attempting to open files with write access, is it?

      --- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';
        Ha ha!! Duh. Well, I will have to check, but that sounds about right. Sometimes I make the stupidest mistakes!!!

        Cheers
        Ha ha!! That'll be it. Duh. Cheers.

        Sleepy time.