• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Find duplicate numbers and replace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find duplicate numbers and replace


  • Subject: Re: Find duplicate numbers and replace
  • From: "Mark J. Reed" <email@hidden>
  • Date: Wed, 14 May 2008 16:16:55 -0400

If you just add /g to your s//, it shouldn't matter what the line
endings are... The example file had all the matching numbers at the
beginning of a line, but that doesn't affect the logic of the solution
if you do a global search.



On 5/14/08, Skeeve <email@hidden> wrote:
> Mark J. Reed schrieb:
>> I'm curious, though: I don't see what cross-platform operation has to
>> do with the whole-file slurp.  I agree that it's better not to do that
>> if you can avoid it, but that's just a general memory efficiency
>> issue.  Where does portability come in?
>>
>>
> Count that to my not-so-well english. Your solution is fine in regards
> to the cross-platform problem I mentioned. Mine isn't.
>
> If you stay on one platform, meaning on the same platform the inputfile
> was created on, there won't be any problem.
>
> But as soon as the platforms are different the notion of \n is different
> and so reading in line by line won't work unless you set $/ to whatever
> the eol mark is on the platform the input file was created on.
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>

--
Sent from Gmail for mobile | mobile.google.com

Mark J. Reed <email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Find duplicate numbers and replace
      • From: Skeeve <email@hidden>
References: 
 >Re: Re1: Mail scripting : How to select… continuation... (From: Philip Aker <email@hidden>)
 >Find duplicate numbers and replace (From: "Script2" <email@hidden>)
 >Re: Find duplicate numbers and replace (From: "Mark J. Reed" <email@hidden>)
 >Re: Find duplicate numbers and replace (From: "Mark J. Reed" <email@hidden>)
 >Re: Find duplicate numbers and replace (From: "Mark J. Reed" <email@hidden>)
 >Re: Find duplicate numbers and replace (From: "Mark J. Reed" <email@hidden>)
 >Re: Find duplicate numbers and replace (From: Skeeve <email@hidden>)
 >Re: Find duplicate numbers and replace (From: "Mark J. Reed" <email@hidden>)
 >Re: Find duplicate numbers and replace (From: Skeeve <email@hidden>)

  • Prev by Date: Re: Yet another Newbie
  • Next by Date: Re: Find duplicate numbers and replace
  • Previous by thread: Re: Find duplicate numbers and replace
  • Next by thread: Re: Find duplicate numbers and replace
  • Index(es):
    • Date
    • Thread