X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,1bf4e46a52a72b7b X-Google-Attributes: gidf996b,public X-Google-ArrivalTime: 1994-12-17 14:02:55 PST Path: nntp.gmd.de!newsserver.jvnc.net!igor.rutgers.edu!rutgers!dziuxsolim.rutgers.edu!uunet!gwu.edu!claflin From: claflin@gwis2.circ.gwu.edu (Daniel Claflin) Newsgroups: alt.ascii-art Subject: Re: Anyway to randomize sig files? Date: 17 Dec 1994 22:02:55 GMT Organization: The George Washington University, Washington DC Lines: 38 Message-ID: <3cvn6f$4ro@cronkite.seas.gwu.edu> References: <34550.stroheck@student.msu.edu> <3cppfl$mc9@cronkite.seas.gwu.edu> <3csckl$bru@lastactionhero.rs.itd.umich.edu> NNTP-Posting-Host: 128.164.127.252 X-Newsreader: TIN [version 1.2 PL2] Kent Stefl Nassen knassen@cochrane.bus.umich.edu said on <16 Dec 1994 15:44:21 GMT>, in alt.ascii-art: I would like to thank you for posting this, but I have a slight problem with it. *sigh* It keeps choosing the same file every time. Whenever I run this, it always chooses the first file within the directory.... )+: *] #!/location/of/perl *] *] $home = "/your/home/directory"; *] srand(time|$$); *] @files = <$home/sigs/*>; ^^^^ Is there something that I could change this to so that it will choose a truely random file from it? Or will I need to use a different program to do it?.....(I'm just a beginner when it comes to coding and programing... so I'm still a bit ignorate here...) *] $this = $files[rand(@files)]; *] *] `cp $this $home/.signature`; Any suggestions would be much appreciated... Thanks, Dan (+: -- ________________________________________________________ / \ \ | \~~| THIS MESSAGE BROUGHT TO YOU BY: | \_/__| Daniel L. Claflin | /~\~~| | |\_/__| | \___/____________________________________________________/