JavaDeploy
SiteMap
Perl 1
Perl 2
ASP
XML
Perl Operators
«Prev
Next»
Perl Intro
Perl Course
Obtaining web Perl
Installing Perl
Learning Perl
Perl History
Perl Language
General Syntax Structure
Perl Comments
Working with Testbed
Perl Conclusion
Perl Variables
Scalar Types
Scalar Variable Syntax
Perl Scalar Context
Numeric Strings Literals (L5)
Perl Lists
Perl Arrays (L7)
Accessing Array Members
Perl Array Subscripts
Perl Stack Array
Shift Unshift
Perl Join Function
Split Function
Perl Hash Functions
Perl Hash Index
Perl Operators
Terms Operators Expressions
Operator Precedence
Perl Math Operators
Perl String Operators
Increment Decrement
Boolean Relational
Match Operator
Substitute Operator
Translation Operator
Pattern Matching Variable
File Test x Operators
Named Unary list Operators
Input Output Operators
Math Operators
Regular Expressions
Using Regular Expresions
Regular Expressions References
Perl Pattern Matching
Pattern Matching Modifiers
Perl Substitution Operator
Perl Substitution Modifier
Perl e Modifier
e Substitution Modifier
Perl Selective Replacement
Perl Subexpressions Selective Replacement
Perl split Function
Extended Regular Expressions
Regular Expressions Conclusion
Regular Expression - Quiz
Perl Read Write - Exercise
Read and Write to a File
Objective:
Write a program that takes two filenames from the command line, then reads one file and writes it to the other.
Additional Challenge
For an additional challenge, have the program test first if the output file exists and prompt the user to see if he or she wants to overwrite it. Paste your code in the text area below and click the
Submit
button when you are finished.