Re: Quick question
On Thu, Nov 22, 2001 at 10:04:24PM -0500, Andre` Niel Cameron wrote: > Anyone know how to get a whole random number in perl? > > rand(18) always gives decimals I need just like 12 or 7 anyone know? Multiply it by the maximum number you want, for example if you want something between [1,20] you do int(rand()*20 + 1) Edwin, wondering if you couldn't have sent it to just one mailing-list. -- Edwin Groothuis | Personal website: http://www.MavEtJu.org [EMAIL PROTECTED] | Interested in MUDs? Visit Fatal Dimensions: --+ http://www.FatalDimensions.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
deleting a file
Hi, Sorry for the stupid question, but i didn't find in the FAQ. What is the sintax to delete a file??? Thanks in advance, Wagner Garcia Campagner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deleting a file
On Fri, 23 Nov 2001, Wagner Garcia Campagner wrote: > Sorry for the stupid question, but i didn't find in the FAQ. > > What is the sintax to delete a file??? unlink deletes a file. perldoc -f unlink -- Brett http://www.chapelperilous.net/ Nice guys finish last. -- Leo Durocher -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deleting a file
unlink("/directory/filename"); perldoc -f unlink - JW On Fri, 23 Nov 2001, Wagner Garcia Campagner wrote: > Hi, > > Sorry for the stupid question, but i didn't find in the FAQ. > > What is the sintax to delete a file??? > > Thanks in advance, > Wagner Garcia Campagner > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: deleting a file
system ("rm $file"); -Original Message- From: Jan-Willem Haaring [mailto:[EMAIL PROTECTED]] Sent: 23 November 2001 15:04 To: Wagner Garcia Campagner Cc: [EMAIL PROTECTED] Subject: Re: deleting a file unlink("/directory/filename"); perldoc -f unlink - JW On Fri, 23 Nov 2001, Wagner Garcia Campagner wrote: > Hi, > > Sorry for the stupid question, but i didn't find in the FAQ. > > What is the sintax to delete a file??? > > Thanks in advance, > Wagner Garcia Campagner > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quick question
this will give you a random number of 0 or 1. Just substitue the 1 for the number range you want. Note: I have found that the lowest and highest numbers do not appear to have the same randomness weighting as the middle range, probably due to the sprintf rounding, so add two to the range you want and disregard the lowest and highest returned. #!usr/bin/perl srand; for($x=0; $x<20; $x++) { $holdRand=sprintf("%.0f", rand(1)); print"\n$holdRand"; } - Original Message - From: "Andre` Niel Cameron" <[EMAIL PROTECTED]> To: "free bsd" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, November 23, 2001 3:04 AM Subject: Quick question > Hi, > > Anyone know how to get a whole random number in perl? > > rand(18) always gives decimals I need just like 12 or 7 anyone know? > > Regards, > Andre` C. > Technical Support > ԿԬ > -- -- > - > Visit our support manual at http://supportmanual.com/ > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]