Can anyone tell me why this program won't kick out when the time gets beyond time in the loop?
sub showtime
{
local($format,$military)=@_;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
if ((! $military) && ($hour > 12)) {$hour-=12;}
... (2 Replies)
Hi Guyz
I designed a script that can compare 2 columns(values) of single file and gives the closest numbers to the first column by comparing the numbers in first column with second and it works in a single file.
Now I'm trying to design a new script with 2 objectives for 2 files (not a single... (4 Replies)
Hi,
I have thousands of files in a directory that have the following 2 formats:
289620178.aln
289620179.aln
289620180.aln
289620183.aln
289620184.aln
289620185.aln
289620186.aln
289620187.aln
289620188.aln
289620189.aln
289620190.aln
289620192.aln....
and:
alnCDS_1.fasta (1 Reply)
I need to process a file line-by-line using some value from a shell variable
Something like:perl -p -e 's/$shell_srch/$shell_replace/g' input.txt
I can't make the '-s' work in the '-p' or '-n' input loop (or couldn't find a syntaxis.)
I have searched and found... (4 Replies)
I am trying to print out a section of a file begining at the start and printng until a character is found.
My code and input file are below. This code is printing out every line except for the line with the character which is not what I want the out put should be a file with numbers 1-4.
... (3 Replies)
Good morning, I appreciate any assistance that I can get from the monks out there. I am able to get this to work for me so that I can do a hostname lookup if I only specify one hostname in the script. What I want to do is have a file with hostnames and do lookups for each name in the file. Here is... (1 Reply)
Hi,
I have a perl script that prompts for a user to enter a password before doing what it does. This works well if I call it directly from a bash script
#!/bin/bash
/path/to/perl/script $arg1 $arg2
But, when I try to enclose this within a while read loop, the perl script is called but... (1 Reply)
I have a script that needs to wait on another script to finish. I created a sub routine to check the file for the number 0 but my until statement keeps on going. I tried eq, == and =~ but same thing.
my $CHECKING_FILE = 1;
do {
sleep(5);
$CHECKING_FILE = check_file();
... (2 Replies)
I have written the below PERL script to reprocess messages from a failure queue.
It basically browses all the messages in the failure queue to individual files in a directory and then scans those files to determine the originating queue. The script will then move each message in turn from the... (0 Replies)
I have reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any usefull for my needs way. (Reviewed and not useful the system(), 'back ticks', exec() and open())
I would like to run another PERL-script from first one, not... (1 Reply)