Answer Posted / raghav
To open a file:
open (FILE, "<raghav.txt") || die ("File Cannot be opened");
Where FILE is the file handle for this file.
Here the file is opened in read mode.
Put > for write mode
put >> for append mode.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the use of command “use strict”?
What is use of ‘->’ symbol?
What does the qq{ } operator do?
Explain string comparison operators in perl.
How to prevent file truncation in perl?
Explain the functioning of conditional structures in perl.
Differentiate between c++ and perl.
What is goto statement in perl?
How do I print the entire contents of an array with Perl?
How can you create anonymous subroutines?
How can I display all array element in which each element will display on next line in perl ?
What happens to objects lost in "unreachable" memory, such as the object returned by Ob->new() in `{ my $ap; $ap = [ Ob->new(), $ap ]; }' ?
Who created perl?
What does the q{ } operator do?
How are parameters passed to subroutines in perl?