The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Random numbers from 0 to 1000 wakhan Shell Programming and Scripting 2 07-15-2008 07:41 AM
How to set constrain on random numbers in c ahjiefreak High Level Programming 6 01-11-2008 04:46 AM
how can i isolate the random sequence of numbers using awk? rcon1 UNIX for Dummies Questions & Answers 2 01-09-2008 09:06 AM
genrating pseudo random numbers hack_tom Shell Programming and Scripting 7 04-27-2007 10:10 PM
Random numbers without repetition asal_email UNIX for Dummies Questions & Answers 8 07-14-2005 04:02 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 2.00 average. Display Modes
  #1 (permalink)  
Old 03-18-2009
repinementer repinementer is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 158
Random Numbers - Perl

Hi Guys I have a script to find Ranomd numbers. But I want to make the file to produce more random. Could u guys help me plz.
In this Script I have the code that generates random in for loop and the range I have specified in my %chromlength
input and out put will be like this
chrno start end
chr1 1234 9980


[/PHP]

Last edited by repinementer; 03-22-2009 at 03:10 AM..
  #2 (permalink)  
Old 03-19-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,846
Excuse me if I might sound thick, but what exactly do you want to do with that script? I tried it and, some "uninitialized value" warnings aside, nothing happened. The output file wasn't much different than the input file and certainly didn't contain any random numbers.
  #3 (permalink)  
Old 03-19-2009
KevinADC KevinADC is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2008
Posts: 731
might help to see some of what the input file looks like. I have a feeling this line is wrong:

if ($chrom[$i] =~ /chrd+/) {

unless you really are looking for "chr" followed by one or more "d". Probably should be:

if ($chrom[$i] =~ /chr\d+/) {

in which case its searching for "chr" followed by one or more digits.

Use the perl highlighter to post perl code. The php highlighter will mangle some perl code.

Besides that, I also don't understand what you are wanting to do.
  #4 (permalink)  
Old 03-26-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,886
Original Poster is a sockpuppet of one who evaded a ban.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0