- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Raise a "File Download" Dialog Box using Perl
Sometime it is desired that you want to give option where a user will click a link and it will pop up a "File Download" dialogue box to the user instead of displaying actual content. This is very easy and will be achieved through HTTP header using Perl Script.
This HTTP header will be different from the header mentioned in previous section. For example, if you want to make a FileName file downloadable from a given link then it's syntax will be as follows −
#!/usr/bin/perl # HTTP Header print "Content-Type:application/octet-stream; name = \"FileName\"\r\n"; print "Content-Disposition: attachment; filename = \"FileName\"\r\n\n"; # Actual File Content will go hear. open( FILE, "<FileName" ); while(read(FILE, $buffer, 100) ) { print("$buffer"); }
- Related Articles
- How To Raise a "File Download" Dialog Box in Python?
- How to raise a "File Download" Dialog Box in Python CGI Programming?
- Save File Dialog Box in Tkinter
- Access to file download dialog in Firefox in Selenium.
- Creating a prompt dialog box using Tkinter?
- How to download a file using Node.js?
- How to show prompt dialog box using JavaScript?
- How can I pop-up a print dialog box using JavaScript?
- How do I automatically download files from a pop up dialog using selenium-python?
- How to create a Custom Dialog box on iOS App using Swift?
- How to create a Dialog Box without a title in Android using Kotlin?
- How can I download a file on a click event using selenium?
- Perl File Extension
- How do we define a dialog box in HTML?
- How to create a Confirmation Dialog Box in Java?

Advertisements