Click here to get back home

Re: How to replace a "/" in perl

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Re: How to replace a "/" in perl jchen750021 03-15-2007
Posted by jchen750021 on March 15, 2007, 10:40 pm
Please log in for more thread options



chunj...@gmail.com wrote in news:1172009738.829363.189370
@v45g2000cwv.googlegroups.com:


> I have a list of sql files, in which it ends with a "/". Now I want to
> replace it with "//end" for all files. And here is my perl command,
> "
> perl -pi.org -e 's/^\/$/^\/\/end$/' *.SQL
> "

> Suprisingly it does not work.



It does not work is a bad description. Please read the posting
guidelines for this group.

#!/usr/bin/perl


use strict;
use warnings;


while ( <DATA> ) {
s and print;



}


__DATA__
/
/


Similar ThreadsPosted
Regex, how do I replace quotation pairs into
  • &
  • ?
    October 21, 2004, 7:27 pm
    ANNOUNCE: Initial release of WSF/Perl (Perl bindings for a WS-* framework) October 4, 2007, 1:37 am
    PLJava - Perl embeded into Java (calling Perl from Java) - 1sr release - call for tests and review, please. July 13, 2004, 4:06 am
    Perl MakeMaker - how to force Perl linking with the static C library (libcrt.lib) instead of dynamic C library (msvcrt.lib) April 17, 2007, 5:22 pm
    MFC with Perl July 19, 2005, 9:38 pm
    Net::SSH::Perl October 23, 2005, 11:16 pm
    perl with ASP November 9, 2005, 10:19 am
    Perl December 30, 2005, 9:28 pm
    perl DBI help March 1, 2006, 10:25 am
    Help with Net::SSH::Perl August 25, 2006, 2:26 pm

    Our other projects:

    Art Dolls, Fairies and Mermaids - Sunnyfaces.net

    Roy's Linux, Programming and Search Engines messages

    1-Script XML SitemapXML Sitemap