|
||||||
| Perl Discussion for the PERL language - Practical Extraction and Reporting Language, is a programming language often used for creating CGI programs. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
I'm printing the lines from a text file.
As I read the lines I would like to remove the linebreak but I can't seem to get it working. I have tried this: But it doesn't seem to work. Any ideas? |
| Sponsored Links |
|
|
|
|||
|
tr/// has no concept of what you are trying to do, s/// would work (I think) but perl has the chomp() function which is specifically for removing the input record seperator (or line endings) which is by default a newline (\r\n on windows).
Code:
chomp($line); |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to remove your second XP without formating - [With Video] | Onur | Tutorials | 1 | 08-31-2007 08:42 AM |
| Remove Autofill in FF | falco85 | JavaScript and CSS | 1 | 07-04-2007 11:19 AM |
| Remove Leading 0's | NeedHelp | Perl | 7 | 04-16-2007 02:09 PM |
| Tutorial to Remove the Virus "Trojan horse Startpage.ADE" | clookid | Tutorials | 9 | 01-09-2007 10:39 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 98%