Thomas, Any editor (I use notepad, WinVim, and anything else available - later you may find reason to look for a 'better' editor and there is always plenty of opinion available about editors). With windows, you can set a file extension association by clicking in My Computer, View, Options... , File Types and edit the Open command for the .pl file extension to C:\Perl\bin\perl %1, %* . Your 'Path to Perl' might be different than C:\Perl\bin\perl and is probably set (if you are using ActivePerl). This will allow your programs to use command line arguments. If you are not sure what command line arguments are, use copy and paste to put the following example onto your harddrive save it with a name like prob.pl (after adjusting the file association as described above). Then 'call' with the following line from a dos window prob.pl 20 10 5 This should produce a file called ps_t.txt which you can read with notepad. If you have questions about this particular script feel free to email me directly, but do check the newsgroup as there are alot of people eager to help a beginner get started.
#!D:/cygwin/bin/perl -w # the pound sign makes this line a comment # and works the same way for all lines EXCEPT the first. The #!D:/cygwin/bin/perl -w # on the first line is actually directions for a (non-windows) shell telling it what program to use to # interperet the code that follows (used with Unix, Linux and other operating systems) my ($population, $range, @tvals, $tval, $tsize); # my $tfn = "ps_t.txt"; die "Requires 3 numeric arguments. First is population size, second is maximum value, third is tuple size\n" if @ARGV != 3; # if there are not 3 arguments passed in on the command line use the die function to print an error message and quit ($population, $range, $tsize) = @ARGV; # if we made it here then there are 3 arguments available, catch them in the '$' variables print"$population, $range. $tsize\n"; # print them so we can demonstrate the print function print" This will overwrite $tfn with new data. Continue y/n? "; $ur = getc(STDIN); print"\n"; die "Response $ur indicates abort\n" unless $ur eq "y"; if ($population % $tsize != 0) { # ensure all tuples are full $population += $tsize - ($population % $tsize); print "$population % $tsize is ", $population % $tsize, "\n"; } open OFILE, ">$tfn" or die "Cannot open $tfn :$!\n"; for (my $i = 1;$i <= $population; $i++) { $tval = int(rand($range) + 1); print OFILE " " if $tval < 1000; print OFILE " " if $tval < 100; print OFILE " " if $tval < 10; print OFILE " " if $tval < 1; print OFILE "$tval "; print OFILE "\n" if $i % $tsize == 0; # This sets tuple size, $i must start at 1 for this to work } close OFILE; Thomas Kienberger <[EMAIL PROTECTED]> wrote in message 000801c1acaf$e5c17640$3a8006d5@pc1">news:000801c1acaf$e5c17640$3a8006d5@pc1... Hallo, first: I´ve never programmed, bevore. Now i want to start programming with perl. I´ve made the download of a standard perl version for windows. And now I have no idea how to start with a first small programm. I have bought a book about perl, but there is no describtion of how to start. Do i have to write the programm sentences in a normal editor ? How can I make it run with the perl "compiler". Do I have double-click on perl.exe and then write open "name of the editor-file" or how does it work ? If i would know how this first steps would be to do, then i think i could start working with my book "introduction in Perl for win 32". Please help me !!! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]