Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Newbee21369

    MQ Messages redirected to wrong queue

    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...
  2. Newbee21369

    Read only Files in a Directory

    DUH!!!!!!!!!! Thanks for keeping my head on straight!!
  3. Newbee21369

    Read only Files in a Directory

    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...
  4. Newbee21369

    How do I remove the last 20 bytes from a string?

    ok thanks for everyones input!!
  5. Newbee21369

    How do I remove the last 20 bytes from a string?

    Duncan you gave me a great idea,how about this? $newstring= substr $string,1,$stringlen -20;
  6. Newbee21369

    How do I remove the last 20 bytes from a string?

    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?
  7. Newbee21369

    String Replacement

    This works!! Thanks!!! ($outfilename, $extension)=split /\./, $inputfile; outfilename.="*";
  8. Newbee21369

    String Replacement

    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
  9. Newbee21369

    String Replacement

    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.
  10. Newbee21369

    String Replacement

    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.
  11. Newbee21369

    How do I call a subroutine with in Perl Module?

    This is what I have. Perl Module: #!/usr/bin/perl use lib "/usr/tmhp/data/bin/scripts"; package Test; use TMH; use strict; use DBI; sub connect_dev_app () { my $dbname = 'DBI:Oracle:TMHT2'; my $user = 'xxx'; my $password = 'xxx'; my $dbh; $dbh =...
  12. Newbee21369

    Parsing Question

    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...
  13. Newbee21369

    Parsing Question

    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...
  14. Newbee21369

    Formatting Dates

    $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...
  15. Newbee21369

    Formatting Dates

    I'm trying to take a non-formatted date ($FILE_TS): 01-JAN-05 and format it to look like ($Formatted_FILE_TS): 01/01/2005 13:36:27
  16. Newbee21369

    Formatting Dates

    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...
  17. Newbee21369

    Formatting Dates

    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...
  18. Newbee21369

    How do you use a variable from 1 SubRoutine to be used in another?

    Haha yes that would make quite a difference!! Thanks for your help!!!
  19. Newbee21369

    How do you use a variable from 1 SubRoutine to be used in another?

    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...
  20. Newbee21369

    How do you use a variable from 1 SubRoutine to be used in another?

    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...

Part and Inventory Search

Back
Top