10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have this math program on Perl and when I run it one of the math problems that comes up is 0/0 and perl makes the answer 4. How can I program perl to not include numbers /0?
What I have for the division portion is:
$solution = $num1 * $num2;
($solution, $num1) = ($num1, $solution);
$question... (2 Replies)
Discussion started by: germany1517
2 Replies
2. Shell Programming and Scripting
can anyone help me out to write a code by connecting to the sql database and I need to print the list of tables present in the databse.
any ideas please. (1 Reply)
Discussion started by: ramkumar15
1 Replies
3. Shell Programming and Scripting
I want to traverse a durectory for a particular file. Situataion is like this. Path is ABC/a/c/g. it has around 100 folders in it.
Search a directory which has word "*latest*" in its path.
and then from the latest go through z/x/c to file final.html.
In total, i want it to go through... (4 Replies)
Discussion started by: hemasid
4 Replies
4. Programming
Hi
I am new to perl, i need to write a program to convert horizontal words to vertical
eg: cat, dog, cow,.....(text file)
this should be written as
1.cat
2.dog
like this. can u pls help me to work out.. (4 Replies)
Discussion started by: nitha
4 Replies
5. Shell Programming and Scripting
how would you exit out of a programm correctly, without having for the program to crash?
for example
print "Enter quit";
$input = <STDIN>;
if ($input eq "quit")
{
{QUIT THE PROGRAM}
}
else
{
print "invalid input";
}
one more thing, how do u exit a program "correctly", if... (3 Replies)
Discussion started by: bshell_1214
3 Replies
6. Homework & Coursework Questions
Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Discussion started by: jdkirby
1 Replies
7. Shell Programming and Scripting
could i get any help with how to link this program together. i dont know what to put where the X's are
print `flush`;
thank(); #print thank header
use Getopt::Std; # use declaration with the options function
getopts("ld:") or usage() and exit; ... (3 Replies)
Discussion started by: livewire06
3 Replies
8. Shell Programming and Scripting
I wish to write a Perl program that will provide a listing of files in a directory. The files must be listed in sorted order by the file name.
• By default, the program displays only file names.
• By default, the program lists the files in the current directory.
• The program must provide the... (2 Replies)
Discussion started by: livewire06
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
i want to write a script that executes a program (exec?) .
this program then requires a filename as input.
how do i give it this input in the script so the program will be complete run and close by the script.
e.g.
exec prog.exe
program then asks for filename
"enter filename:"... (1 Reply)
Discussion started by: tuathan
1 Replies
10. Shell Programming and Scripting
why does below program not work?
<> is producing nothing.. still waiting for input.. but i thought this would work?
#!/usr/bin/perl -w
use strict;
my @array2;
my @array1 = ("David Veterinarian 56", "Jackie Ass 34", "Karen Veterinarian 28");
$_ = @array1;
while (<>) {
... (4 Replies)
Discussion started by: hankooknara
4 Replies