Advertisement

04.10.2008 at 12:56AM PDT, ID: 23310847
[x]
Attachment Details

read from file (file handling)

Asked by firekiller15 in Perl Programming Language

Tags: Perl

i play with perl on window xp
i want to read from file.As i run my program error displayed.
below is my code


$file = 'C:\Documents and Settings\Administrator\Desktop\passwd.txt';
open(info,$file); #open file
@lines = <info>;
close(info,$file); #close file
print @lines


i save my text file on my desktop.Why?? cannot run?Start Free Trial
[+][-]04.10.2008 at 01:06AM PDT, ID: 21322597

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 01:21AM PDT, ID: 21322690

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: Perl
Sign Up Now!
Solution Provided By: Tintin
Participating Experts: 3
Solution Grade: A
 
 
[+][-]04.10.2008 at 01:28AM PDT, ID: 21322733

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.10.2008 at 01:43AM PDT, ID: 21322796

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 02:28AM PDT, ID: 21322965

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628