473,396 Members | 1,970 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,396 software developers and data experts.

Specifying *!__!* as a string

I need to replace *!__!* throughout a file with a comma.

What slashes and backslashes do I need in:

Expand|Select|Wrap|Line Numbers
  1. my $delim_delim='*!__!*';
To make perl pick it up?
May 2 '07 #1
2 1172
miller
1,089 Expert 1GB
Hi Damocles,

The only regex special characters in that string are the *'s. However, if you are ever unsure what characters to escape, you can always take advantage of the quotemeta alias.

Expand|Select|Wrap|Line Numbers
  1. my $delim_delim='*!__!*';
  2. $lineFromFile =~ s/\Q$delim_delim\E/,/g;
  3.  
- Miller
May 2 '07 #2
Thanks Miller, that's sweet.
May 4 '07 #3

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

Similar topics

0
by: Sri | last post by:
Hi, I'm having trouble specifying the classpath (to Ant) when I'm running Ant from within a servlet. Whatever directory I try to specify, Ant is trying to build the path starting at c:\ on my...
11
by: Alec S. | last post by:
Hi, Is it possible to create a colored box like this? : <html> <head> <style type="text/css"> #bbb { background: #f00; position: absolute;
4
by: Bilgehan.Balban | last post by:
Hi, The following code: #include <stdio.h> // const int const_asize = 10; #define define_asize = 10; int array = {1,2,3,4,5,6,7,8,9,0};
0
by: namri | last post by:
Hi, I want to crypt a message with RSAPKCS1KeyExchangeFormatter with a RSAKey that I have. The only way that I see to do it is to get an initialize RSAPKCS1KeyExchangeFormatter with an instant...
1
by: Colin Graham | last post by:
Specifying location of web site using VS 2003 setup project. I have an issue trying to install my asp.net website to a specific location. I have several webistes in my IIS Manager and it keeps...
1
by: Guadala Harry | last post by:
I have a user control that I'm inserting into multiple pages. Part of the HTML content in the user control is a path to an image: <img src="../images/arrow.gif" width="11" height="8" border="0">...
10
by: Steve Atkins | last post by:
I have a large table (potentially tens or hundreds of millions of rows) and I need to extract some number of these rows, defined by an integer primary key. So, the obvious answer is select *...
3
by: Marcio Caetano | last post by:
Hello ! Consider the examples bellow: 1- I create a table named TBA with columns ( A int , B char(10) ) 2- I create an B-Tree index named IDXA using the column A 3- I create an GIST (or...
2
by: UJ | last post by:
What's the general feeling on using the using keyword versus spelling the type out completely. For instance, do most people put a using in so they can just say MyNewType or do people not use...
1
by: zufie | last post by:
Hi, I want to specifying a foreign key by altering a table. First, I create an ORDERS table without specifying a foreign key. Here is my code: CREATE TABLE ORDERS (Order_ID integer,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.