|
||||||
| 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 07:42 AM |
| Remove Autofill in FF | falco85 | JavaScript and CSS | 1 | 07-04-2007 10:19 AM |
| Remove Leading 0's | NeedHelp | Perl | 7 | 04-16-2007 01:09 PM |
| Tutorial to Remove the Virus "Trojan horse Startpage.ADE" | clookid | Tutorials | 9 | 01-09-2007 09:39 PM |
| Xav | ........ | 1322.18 |
| MeTh0Dz|Reb0rn | ........ | 1053.7 |
| morefood2001 | ........ | 879.43 |
| John | ........ | 877.37 |
| marwex89 | ........ | 869.98 |
| WingedPanther | ........ | 830.24 |
| Brandon W | ........ | 735.07 |
| chili5 | ........ | 309.39 |
| Steve.L | ........ | 239.84 |
| dcs | ........ | 216.02 |
Goal: 100,000 Posts
Complete: 82%