Solved

can perl access CD-ROMS

Posted on 1998-06-03
4
153 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…
Six Sigma Control Plans

623 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