Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Greetings Ken, and thanks again!
Your example(s) both work exactly as you indicated they would.
Took me awhile to sort it all out. But I'm afraid I wasn't as clear, or as concise
as I could/should have been -- soory. :(
I had already performed a mas-rename on the files by cobbling a sh(1) script, with the
help of find(1), basename(1), cp(1), && rm(1) through a for loop.
This is what left me with the task of correcting the references to the files previous
names within the newly named files. This is where my request came in -- again, sorry for not better clarifying.
I tried to apply your logic to the task of reading the contents of the files
and applying it to their contents. But I guess I'm just not yet proficient enough in perl(1). :(
So I got anxious, and mostly conquered the abc100 - abc999.html's
via another sh(1) script
#!/bin/sh - # fixem -- a simple stupid && inefficient shell script for name in $(find . -type f -name '*.html' -maxdepth 1) do # sed(1) recognizing Extended RE(s) sed -Ef fixem.sed <$name >temp.txt mv temp.txt $name done rm -f temp.txt
fixem.sed
/abc([1-9][0-9][0-9])\.html/s/abc/abc0/g
While that shell script fixed most of the occurrences, it missed a few, and it
also didn't address abc1 - 99.html. So now I'm going to try and figure out how
to best attack/accomplish this same (il)logic in perl(1). :)

Any pointers/guidance/solutions still greatly appreciated. :)

Thanks again for everyones' time, and consideration.

--chris

#!/usr/bin/perl -Tw
use perl::always;
my $perl_version = "5.12.4";
print $perl_version;

In reply to Re^4: RE question; how to insert a digit between const[a-z]*3 && inc[0-9]*3? by taint
in thread RE question; how to insert a digit between const[a-z]*3 && inc[0-9]*3? by taint

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-03-28 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found