I am trying to install and use CPAN's Text::Delimited module in my perl script in UNIX.
Steps that I followed
1. downloaded the module from CPAN site into my local unix directory / +user/comp/name 2. gzip -dc Text-Delimited-2.00.tar.gz 3. tar -xof Text-Delimited-2.00.tar.gz 4. cd Text-Delimited-2.00 5. perl Makefile.PL PREFIX=/user/comp/name 6. make install
This is what i got
cp lib/Text/Delimited.pm blib/lib/Text/Delimited.pm Manifying blib/man3/Text::Delimited.3 Installing /user/comp/name/lib/site_perl/5.8.8/Text/Delimited.pm Installing /user/comp/name/man/man3/Text::Delimited.3 Writing /user/comp/name/lib/site_perl/5.8.8/x86_64-linux-thread-multi/ +auto/Text/Delimited/.packlist Appending installation info to /user/comp/name/lib/5.8.8/x86_64-linux- +thread-multi/perllocal.pod
A lib and man folder was created in the /user/comp/name folder.
my script modtest.pl resides in the /user/comp/name folder.
Here is my script
#!/usr/bin/perl use lib "/user/comp/name"; use strict; use Text::Delimited; my $file = new Text::Delimited; $file->delimiter('\t'); $file->open('file.txt'); my @header = $file->fields; while ( my $row = $file->read ) { print $row->{COLUMN1}; } $file->close;
error: which i get is
can someone plz direct me on what is wrong?? how can i install and use the module?? ThanksCan't locate Text/Delimited.pm in @INC (@INC contains: /user/comp/na +me /opt/nasapps/stow/perl-5.8.8-fixhs/lib/5.8.8/x86_64-linux-thread-m +ulti /opt/nasapps/stow/perl-5.8.8-fixhs/lib/5.8.8 /opt/nasapps/stow/p +erl-5.8.8-fixhs/lib/site_perl/5.8.8/x86_64-linux-thread-multi /opt/na +sapps/stow/perl-5.8.8-fixhs/lib/site_perl/5.8.8 /opt/nasapps/stow/per +l-5.8.8-fixhs/lib/site_perl .) at modtest.pl line 4. BEGIN failed--compilation aborted at modtest.pl line 4.
In reply to Usuage of CPAN's Text::Delimited by Ratna_Ranjan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |