• 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: Determining item number matching "x" in a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining item number matching "x" in a list


  • Subject: Re: Determining item number matching "x" in a list
  • From: John Delacour <email@hidden>
  • Date: Fri, 14 Mar 2003 16:02:56 +0000
  • Mac-eudora-version: 6.0a11

At 3:36 pm +0000 14/3/03, John Delacour wrote:

$_ = 33 + int rand(223)...

That ought to be 222, not that it makes any difference, so


set sought to "a"
do shell script "perl -e '
open F, qq~>/tmp/junk.txt~ ;
for (1..32000) { print F chr(33 + int rand 222) . $/ }'"
do shell script "perl -e '
$f = qq~/tmp/junk.txt~ ; open F, qq~$f~ ;
for (<F>) { $i++ ; /" & sought & "/ and print qq~$i$/~ }'"
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Determining item number matching "x" in a list (From: Steve Cunningham <email@hidden>)
 >Re: Determining item number matching "x" in a list (From: John Delacour <email@hidden>)

  • Prev by Date: Re: Determining item number matching "x" in a list
  • Next by Date: Re: POSIX file weirdness
  • Previous by thread: Re: Determining item number matching "x" in a list
  • Next by thread: Re: Determining item number matching "x" in a list
  • Index(es):
    • Date
    • Thread