Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

can perl access CD-ROMS

Posted on 1998-06-03
4
Medium Priority
?
154 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
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 …
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

688 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