Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: doood
  • Order by date
  1. doood

    ER makes me er.....

    #!/usr/bin/perl undef $/; $_ = <DATA>; $/ = "\n"; s|<person>(\d+)</person>|<a href="somePage.pl?id=$1">'$this->get('$1')->toString'</a>|g; print; __DATA__ blah blah <person>43</person> blah blah <person>123</person> blah blah <person>998877</person> blah blah <person>3</person> blah blah...
  2. doood

    matches this but not all ...

    Sorry MoshiachNow - I misunderstood you How' this (it's too early for me to check it carefully - but I think it's o.k.) #!/usr/bin/perl while (<DATA>) { chomp; print "$_\n" unless $_ =~ /\.(txt|nfo|log|zip)$/ ^ $_ eq 'UserAccounts.txt'; } __DATA__ dummyfiletofind.file ignore_me.nfo...
  3. doood

    matches this but not all ...

    #!/usr/bin/perl while (<DATA>) { chomp; print "$_\n" if $_ =~ /\.(nfo|log|zip)$/ || $_ eq 'UserAccounts.txt'; } __DATA__ dummy.file file.nfo file123.log anotherfile.nfo not.me nor.me xyz.zip abc123.txt pickme.nfo findme.zip ignoreme.txt UserAccounts.txt dontpickme.txT rubbish.file...
  4. doood

    de-duplication

    say, for example, I have a text file that reads:- Fred Bloggs 123 Example Street Fred Bloggs 123 Example Street Would it be possible to delete one of the entries?
  5. doood

    de-duplication

    Please can someone tell me if it is possible to de-duplicate a text file
  6. doood

    substituting

    It works!!! I have no idea how though! Could you please explain briefly how the program works as I do not know how to replace your example for mine in my program. Why does the substitution work in your program but not in my example? Even if I copy your substitute line out of your program into...
  7. doood

    Help With Line Length

    Hi Lee I am afraid I am a novice with Perl but this does do what you need - albeit a bit messy as it will cut words up - I will try to work on one that will not open (INFILE, 'sixtyfour.txt'); $file = <INFILE>; for ($position = 0; $position < length($file); $position +=64) { print...
  8. doood

    substituting

    Hi Tracy Thanks again for your reply This is the relevant code copied & pasted from my program... open(INFILE, 'file.txt') while (<INFILE>) { $cell =~ s/\Q(*)\E/\Q<z9b15>(*)<z$b$>\E/g; } I have placed the \Q...\E codes around the substitute FROM/TO values as you suggested but I am afraid no...
  9. doood

    substituting

    Dear Tracy Many thanks for your reply - I am very grateful for your help Unfortunately I am getting the following result using your regexp \\(\*\) Does this make any sense? Kind Regards Duncan
  10. doood

    Cookie Expiration

    This should work:- print &quot;Set-Cookie: Information=$Information; expires=Thu, 31-Dec-1998 00:00:00 GMT\n&quot;; obviously the date is just an example of the required syntax Good Luck Duncan
  11. doood

    substituting

    Thank you for your response - That is exactly what I need to achieve - they are control codes for QuarkXpress that I need to wrap around the (*) to adjust its size - just in case you were interested! Hope you can be of help... Cheers Duncan
  12. doood

    substituting

    Please can anyone help... I am trying to substitute '(*)' and replace with '<z9b15>(*)<z$b$>' I am not having much luck! Many thanks
  13. doood

    perl pattern matching

    Please can anyone help... I am trying to substitute '(*)' and replace with '<z9b15>(*)<z$b$>' I am not having much luck! Many thanks

Part and Inventory Search

Back
Top