CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Help for upload text file need

 



nora
Deleted

Mar 18, 2000, 12:05 AM

Post #1 of 2 (560 views)
Help for upload text file need Can't Post

 
When I use upload by browse I get:
foreach $line (@data){
$line ( I get all lines of a file in one line )
}
Result:
line1line2line3
-------------
When I upload text file by FTP I get what I need:
foreach $line (@data){
$line ( I get line by line )
}
Result:
line1
line2
line3

How to modify file.txt uploaded by script
to be the same as transfered by FTP?

Any suggestion?

Thanks

Nora


Cure
User

Mar 18, 2000, 7:54 AM

Post #2 of 2 (560 views)
Re: Help for upload text file need [In reply to] Can't Post

Hi nora

you need a new line character(\n)

Example:

@data = qw(line1 line2 line3);

foreach $line (@data){
print "$line\n";
}


Cure

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives