Deib has asked for the wisdom of the Perl Monks concerning the following question:
Well, the tcard.conf file has a list of URLs. The problem is that the string i get from $lines[0] is not a valid URL. My guess is that there is a "/n" at the end of each line, and that is why it won't allow me to get it. So, I would like to know a way to remove all the "/n" from the array.my $file = './tcard.conf'; open(INFO, $file); my @lines = <INFO>; close(INFO); my $url = $lines[0];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to eliminate "/n" from text
by osunderdog (Deacon) on Dec 29, 2004 at 23:39 UTC | |
by Deib (Sexton) on Dec 29, 2004 at 23:47 UTC | |
|
Re: How to eliminate "/n" from text
by Old_Gray_Bear (Bishop) on Dec 29, 2004 at 23:58 UTC | |
by Deib (Sexton) on Dec 30, 2004 at 00:08 UTC | |
|
Re: How to eliminate "/n" from text
by larryp (Deacon) on Dec 30, 2004 at 04:22 UTC | |
by Anonymous Monk on Jan 02, 2005 at 09:48 UTC | |
by Deib (Sexton) on Jan 05, 2005 at 01:10 UTC | |
by Deib (Sexton) on Jan 05, 2005 at 01:07 UTC | |
by larryp (Deacon) on Jan 12, 2005 at 18:42 UTC | |
|
Re: How to eliminate "/n" from text
by geektron (Curate) on Dec 29, 2004 at 23:50 UTC | |
|
Re: How to eliminate "/n" from text
by BUU (Prior) on Dec 30, 2004 at 00:44 UTC |