473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Removing carriage returns

Hi guys

I am trying to remove carriage return /space in perl from my file
using this function :
$record =~ s/[\r\n\r]+/ /g; OR
chomp($record);

nothing is working , can anybody help me please with this
Aug 15 '07 #1
2 7417
KevinADC
4,059 Expert 2GB
this should remove all carraige returns and newlines from anywhere in $record.

$record =~ s/[\r\n]/ /g;
Aug 16 '07 #2
KevinADC
4,059 Expert 2GB
FYI:

"URGENT" in a subject line translates into: "IGNORE MY QUESTION UNTIL LAST".

-Kevin
Aug 16 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Augustus | last post by:
Hiya, I have a form with a <textarea></textarea> to receive user input. This input is then stored in a database and sent by fax... I need to be able to remove the carriage returns (enter...
4
by: Les Juby | last post by:
Can someone please help with a suggestion as to how I can keep the formatting (carriage returns) that the user enters into a memo field and then display that later. I figured I might be able to...
2
by: eagleofjade | last post by:
I am trying to import data from a Word document into an Access table with VBA. The Word document is a form which has various fields. One of the fields is a field for notes. In some cases, this...
2
by: Matt Mercer | last post by:
Hi all, I am having a frustration problem, and I have read about 25 newsgroup postings that do not have a satisfying answer :) The problem appears to be common where carriage returns are lost...
2
by: ankit | last post by:
Hi All, I want to remove a substring from a string without any additional tabs/returns in the output string. Is there any method availaible or how can I do it. For the ease, I am giving an...
3
by: Smythe32 | last post by:
Hi All, I am trying to remove carriage returns from a text field via some code. Here is an example of what I am up against. The field streetname contains the little square box that I believe...
7
by: mattrapoport | last post by:
I have a page with a div on it. The div displays a user comment. When the user logs into this page, their current comment is pulled from a db and displayed in the div. The user can edit the...
3
by: ics3djc | last post by:
Hi. Is there a way to remove carriage returns and line feeds from a field in SQL. Here is what I have at the moment: CAST(m.Description AS VARCHAR(8000))AS "Product Description" (have had...
6
by: shajias | last post by:
Hi, I am having a xml code like this <name> I am having a carriage return here. Second line with carriage return. This is the last line. </name>
1
by: cgillett76 | last post by:
Hello, I'm using InfoPath to write data to a accessvdatabase. Once the form has been submitted a VB script runs to create a text file to input to another application. Some of the fields contain...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.