Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Read tab delimited file into an array with ASP

Reply
Thread Tools

Read tab delimited file into an array with ASP

 
 
Rob
Guest
Posts: n/a
 
      08-16-2003
Hi,

Sorry if this has been asked before(I searched, but didn't see
anything).
I need to read a tab delimted file into an array with ASP. Should be
easy enough, I know it is in Perl and PHP. Can someone show me how
that's done or post a link to an example.

This is what I'm trying to do in perl:

#!/usr/bin/perl -w

my $file = "myfile.txt";
open(FILE, $file);
while(<FILE>){
my ($f1, $f2, $f3) = split('\t', $_); # or @array = split('\t', $_)
print "F1:$f1 \t F2:$f2 \t F3:$f3\n";
}
close(FILE);


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl/unix script to convert a fixed width file to a tab delimited file Srikant Perl Misc 1 09-29-2007 02:32 PM
convert non-delimited to delimited RyanL Python 6 08-28-2007 12:06 AM
Re: Read tab delimited ascii file Swaroop C H Python 0 05-12-2005 12:11 PM
how to read a tab delimited file jrlen balane Python 3 03-16-2005 05:57 AM
Is there any perl script for converting XML file to tab-delimited file ? gongwuming@hotmail.com Perl Misc 1 04-14-2004 05:15 PM



Advertisments