X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,1bf4e46a52a72b7b X-Google-Attributes: gidf996b,public X-Google-Thread: 1012a6,29a923fbbd8ba89c X-Google-Attributes: gid1012a6,public X-Google-ArrivalTime: 1994-12-17 19:59:04 PST Path: nntp.gmd.de!dearn!blekul11!idefix.CS.kuleuven.ac.be!ub4b!EU.net!howland.reston.ans.net!pipex!uunet!gwu.edu!claflin From: claflin@gwis2.circ.gwu.edu (Daniel Claflin) Newsgroups: alt.ascii-art,comp.unix.shell Subject: Re: Anyway to randomize sig files? Followup-To: alt.ascii-art,comp.unix.shell Date: 18 Dec 1994 03:59:04 GMT Organization: The George Washington University, Washington DC Lines: 54 Message-ID: <3d0c28$62s@cronkite.seas.gwu.edu> References: <34550.stroheck@student.msu.edu><3cppfl$mc9@cronkite.seas.gwu.edu> NNTP-Posting-Host: 128.164.127.252 X-Newsreader: TIN [version 1.2 PL2] Xref: nntp.gmd.de alt.ascii-art:18240 comp.unix.shell:17865 I'm still having problems in that the randomizing isn't working for me. It always seems to choose the first one.. I've tried to run the two programs that I've found on this group and both of them have not successfully randomized it at all.. )+: Maybe I'm doing something wrong?... I know it really doesn't matter that much, it's just a neat little gadget anyways...so I just wish to really thank all the people out there trying to help and all... especially since they are much more talented than myself... Randal L. Schwartz merlyn@stonehenge.com said on <18 Dec 1994 00:15:28 GMT>, in alt.ascii-art: *] Well, put them all in the perl program then: *] #!/usr/bin/perl *] srand(time ^ $$); # not |, which loses information *] $/ = "\n%%\n"; *] @sigs = ; *] open(SIG, ">.signature"); *] print SIG $sigs[rand(@sigs)], "\n"; *] __END__ *] Here's a sig *] and it can have multiple lines *] %% *] Here's the second sig *] and it too *] can have multiple lines *] %% *] Here's another sig that has %% somewhere in it. *] %% *] And here's another sig. Really! *] There. It's just one file, with the data in the program. Perl is *] Your Friend. ^^^^^^^^ ^^^^^^^^^^^^^^^^ I sure hope so... atleast it seems to be... (+: Thanks again... Dan (+: -- ________________________________________________________ / \ \ | \~~| THIS MESSAGE BROUGHT TO YOU BY: | \_/__| Daniel L. Claflin | /~\~~| | |\_/__| |