If two Queues have the exact same Channel Name,Host Name,Port Number,Queue Manager except for the Queue Name,
and an incoming message comes in and there is an issue with Queue Name1, because everything is the same including
the port number is it possible that the message will write to Queue...
I'm trying to read only files in a directory. I have tried the code below but still having issues. Any suggestions?
#### Need to keep this code unchanged
opendir DIR, "Whatever/path";
@files=grep { !/^\.+$/ } readdir(DIR);
closedir DIR;
####Need to return only files in code shown below. I have...
I'm trying to:
1. Get the total bytes of a string.
2. Remove the last 20 bytes of that string
3. Set what is left over to a string.
So far I have only # 1? does anyone know how to do this?
Paul,
The extension will vary, how could this be written to take that in consideration?
($filename, $extension)=split /\./, $file;
$file.="*"; # the asterisk may need escaping if so try
what does this mean and where does file $file string fit into this? I forgot to mention I need to return a new string with the formatted file. Thanks again.
I'm trying to look for files that contain and ".". If so replace "." with * (wilcard) and remove all text after it.
for example if I have:
INPUT:
FileName1.Doc
FileName2.xls
FileName3.txt
OUTPUT:
FileName1*
FileName2*
FileName3*
Any Ideas on how I can do this?
Thanks in Advance.
This one was the one I could understand the most and worked
the best for me. Thanks to everyone for your input!!!!
if($filepath =~ m/usr/i) # is the string '/usr/' in there?
{
$_ = $'; # yes, save everything after it
if($filepath=~ m/tape/i)# is the string...
I'm trying to parse each path that is found between: /usr/ AND /tape/
while ignoring the case.
1. /usr/tmhp/data/mark/Erco/from_Erco/archive/tape/501046515504800.x12
2. /usr/ltmhprod/data/GIS/MorganS/From_MorganS/Archive/tape/5010465155048.x12
3...
$FILE_TS is a date value that is returned from a stored proc. It looks like: 01-JAN-05
#!/usr/bin/perl
use Time::localtime;
sub mysub($)
{
my $FILE_TS=shift;
$Formatted_FILE_TS = sprintf("%02d/%02d/%04d...
Previously I had tm=localtime.
I tried this:
$Formatted_FILE_TS = sprintf("%02d/%02d/%04d %02d:%02d:%02d",($FILE_TS->mon)+1,$FILE_TS->mday,($FILE_TS->year)+1900,$FILE_TS->hour,$FILE_TS->min,$FILE_TS->sec);
But got the Error: Can't call method "mon" without a package or object reference
Any...
Hi,
How do I format $FILE_TS (01-JAN-05) to look like: 01/01/2005 13:36:27
Currently I tried: $FILE_TS = sprintf("%02d/%02d/%04d %02d:%02d:%02d",($tm->mon)+1,$tm->mday,($tm->year)+1900,$tm->hour,$tm->min,$tm->sec);
Printing: 05/17/2005 13:36:27
Format is what I want but it's giving today's...
Your right, I have to call the first sub to get the value for $SPANISH which is needed for the second sub.
currently I'm getting the print statement:
means Hello in Spanish, and we say HELLO in English
Any suggestions would be greatly appreciated.
Here is my modified code:
#!/usr/bin/perl -w...
Here is a more simplified version of code to see what I'm trying to accomplish. I want it to print the following:
HOLA means Hello in Spanish, and we say HELLO in English.
silly print statement, but I'm trying to show you want I'm trying to accomplish. Right now it prints nothing.
Thanks Again...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.