Solved

can perl access CD-ROMS

Posted on 1998-06-03
4
148 Views
Last Modified: 2010-03-04
hello everyone
i dont think this is exactly a Perl question but, is there some way to access CD-ROM information via the web...im looking for any information on any of the ways to do this...basically all i need to know is if a person who requests a certain predefined file from their browsser can be delivered this file from a CD back to thier browser...
0
Comment
Question by:wired
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
tpryor earned 50 total points
ID: 1207368
Yes you can, as long as you have the correct correct path to the file on the cd rom, using server redirection. In perl simply...
print "Location: $file_path", "\n\n";

thats it,
t
0
 
LVL 84

Expert Comment

by:ozo
ID: 1207369
That would tell your browser to access the file if $file_path is a URL for the file
You'd get the same thing if you typed $file_path as the URL in your browser
if you want your Perl program to access the file, you can
  open(FILEHANDLE,"<$file_path") or die "Can't open $file_path because $!");

0
 

Author Comment

by:wired
ID: 1207370
thank you!
0
 
LVL 2

Expert Comment

by:tpryor
ID: 1207371
Both work.
It depends on what you want to do.
If you need to pre-process the file or wrap it in a html header and footer then the way ozo suggested is the way to go.
If no preprocessing is nessasary then use my way it will just serve it up as is.

t
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question