Simple Perl program need help 
Author Message
 Simple Perl program need help

Hi,

I am new to perl and I am try to write a simple script that randomises
files.

I have 100 Thousand Tiff images that I would like to mix randomaly and run
them through a Simulator, can some one help us write the code or point us to
some sample code.

Thanks



Wed, 01 Sep 2004 21:05:58 GMT  
 Simple Perl program need help
It would be useful to know a few details of the naming convention and
directory structure where your files are located, and the interface to
your Simulator.

As a random shot in the dark, suppose you just have one big directory
with all the files in it, each named n.tiff, where n is a decimal
number, for example, 0.tiff, 1.tiff, ..., 28374.tiff, ..., 99999.tiff.
 Suppose further that you can invoke your simulator (whatever it is)
from the Unix command prompt as

   simulate 23847.tiff

These are outrageous assumptions, and almost surely bad.  But, if
true, you could use something like

   #! /usr/local/bin/perl
   #  This is random_filename.pl
   $z = srand;
   $z = int(rand(100000));
   print $z, ".tiff";

And then have a little shell script:

   #! /bin/csh
   simulate `random_filename.pl`

Okay, if this doesn't quite hit the mark, you'll have to give us more
details.

Cheers!
Jerry Oberle
  perl -e 'print "E-Mail me at \147oberle\100earthlink\056net\n";';

Quote:

> Hi,

> I am new to perl and I am trying to write a simple script that randomises
> files.

> I have 100 Thousand Tiff images that I would like to mix randomly and run
> them through a Simulator.  Can someone help us write the code or point us to
> some sample code?

> Thanks



Sun, 05 Sep 2004 02:48:09 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help: Need simple perl program

2. HELP needed on a simple Parse::RecDescent program (problem: some rules are matched twice)

3. HELP needed on a simple Parse::RecDescent program (problem: some rules are matched twice)

4. Need Help with Simple Program

5. Need help with a simple program (newbie).

6. Newbie Needs Help with a Simple Program

7. Newbie needs help with a simple program...

8. Simple PERL program - HELP!

9. simple Perl/Tk program not run, help please!

10. Help me with a simple input/output CGI program using perl

11. Help for a perl program (small and simple)

12. Need simple program and programmer - bid today!

 

 
Powered by phpBB® Forum Software