CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
I am loosing value of my argument

 

First page Previous page 1 2 3 Next page Last page  View All


digioleg54
User

Jul 22, 2016, 8:06 AM

Post #51 of 65 (8149 views)
Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post

I didn't add anything after queue. It is the last.


FishMonger
Veteran / Moderator

Jul 22, 2016, 8:18 AM

Post #52 of 65 (8146 views)
Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post

I realize it was the last option in your previous tests, but I'm asking you to adjust the order of the args (by adding 1 more option) to see what happens.

Part of the reason is to see if the Windows file type association is configured correctly. If it isn't, it could be cutting off part of the arguments.

What's odd to me is that your previous dump of the @ARGV array did have the value of the queue option and your dump of the hash had it as well but now you're saying that value is missing which is why I asked if you used pop before the GetOptions() call.


digioleg54
User

Jul 22, 2016, 8:35 AM

Post #53 of 65 (8144 views)
Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post

I will do it. But sometimes I am wondering why he was using so complicated system like $data->{port}->{tb} and so on. Wasn't it easier to put data to different hashes and use them separately?


digioleg54
User

Jul 22, 2016, 8:43 AM

Post #54 of 65 (8140 views)
Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post

Actually computer is pretty old, 2009, 32 bits, 4 G memory


FishMonger
Veteran / Moderator

Jul 22, 2016, 8:45 AM

Post #55 of 65 (8139 views)
Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post

I would need to see more of the code to answer that question but I do agree that the code is overly complicated and based on the limited amount of code you've shown, I'd say its logic flow is messy/convoluted.

This app should have been written using one of perl's GUI frameworks and/or used dispatch tables.


FishMonger
Veteran / Moderator

Jul 22, 2016, 8:47 AM

Post #56 of 65 (8138 views)
Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post

lol, that's on par with the systems I have to work with at our company.


digioleg54
User

Jul 22, 2016, 9:55 AM

Post #57 of 65 (8133 views)
Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post

Sorry,
what is it:Windows file type association and where can I find and configure it correctly


digioleg54
User

Jul 22, 2016, 10:12 AM

Post #58 of 65 (8130 views)
Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post

I added last element after queue. Seems like the program doesn't see it, error message:

Option queue requires an argument

Error in processing args

-dev Use dev dir
-port PFI portfolio number
-start_date start_date of pam reports
-end_date end_date of pam reports. Date Format
is mm/dd/yyyy
-pam use reports( hard coded names ) run o
ut of pam to user hard coded directory
-xrun recycle auto run pam jobs
-tb run run trial balance only


FishMonger
Veteran / Moderator

Jul 22, 2016, 12:29 PM

Post #59 of 65 (8123 views)
Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post

The assoc command is used to link the file ext to an executable and the ftype command is used to configure how it's executed and if it should accept arguments and how many args..


Code
C:\>help assoc 
Displays or modifies file extension associations

ASSOC [ext[=[fileType]]]

.ext Specifies the file extension to associate the file type with
fileType Specifies the file type to associate with the file extension

Type ASSOC without parameters to display the current file associations.
If ASSOC is invoked with just a file extension, it displays the current
file association for that file extension. Specify nothing for the file
type and the command will delete the association for the file extension.



Code
C:\>help ftype 
Displays or modifies file types used in file extension associations

FTYPE [fileType[=[openCommandString]]]

fileType Specifies the file type to examine or change
openCommandString Specifies the open command to use when launching files
of this type.

Type FTYPE without parameters to display the current file types that
have open command strings defined. FTYPE is invoked with just a file
type, it displays the current open command string for that file type.
Specify nothing for the open command string and the FTYPE command will
delete the open command string for the file type. Within an open
command string %0 or %1 are substituted with the file name being
launched through the assocation. %* gets all the parameters and %2
gets the 1st parameter, %3 the second, etc. %~n gets all the remaining
parameters starting with the nth parameter, where n may be between 2 and 9,
inclusive. For example:

ASSOC .pl=PerlScript
FTYPE PerlScript=perl.exe %1 %*

would allow you to invoke a Perl script as follows:

script.pl 1 2 3

If you want to eliminate the need to type the extensions, then do the
following:

set PATHEXT=.pl;%PATHEXT%

and the script could be invoked as follows:

script 1 2 3


I often manually edit the registry entry if it's not set correctly.


digioleg54
User

Jul 22, 2016, 12:41 PM

Post #60 of 65 (8121 views)
Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post

I am doing it on my own computer. but I am on contract. I will tell boss, he can decide it.

thanks a lot for your help.
Next week I will be looking for new job, if it is possible on summer and in my age. :)


Laurent_R
Veteran / Moderator

Jul 22, 2016, 2:29 PM

Post #61 of 65 (8117 views)
Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post

Are you so old that it is so difficult?

Wink


FishMonger
Veteran / Moderator

Jul 22, 2016, 2:34 PM

Post #62 of 65 (8115 views)
Re: [Laurent_R] I am loosing value of my argument [In reply to] Can't Post

Depends on your age and the job market in your area.

At my age and location, it would be near impossible unless I consider going back to work for my brother in the (seafood) restaurant business. :(


(This post was edited by FishMonger on Jul 22, 2016, 2:37 PM)


digioleg54
User

Jul 26, 2016, 9:48 AM

Post #63 of 65 (8004 views)
Re: [Laurent_R] I am loosing value of my argument [In reply to] Can't Post

unfortunately I am 61 and get a job ....... and summer


Laurent_R
Veteran / Moderator

Jul 26, 2016, 10:37 AM

Post #64 of 65 (8002 views)
Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post

Hmm, sorry, it was meant to be funny, but I realize it wasn't at all. Blush

Having said that, I am now 60. When I got fired almost 8 years ago due to the financial crisis back in 2008, I figured out that it would probably be difficult for me to find a regular employment contract, so I became a free-lance consultant, and that was pretty successful.

A month ago, I finally succeeded to sign a regular employment contract with the company for which I had been consulting in the last 3 and a half years; they feared that, if they did not offer me a regular employment contract, I might be interested to work for a competitor. That's how I've just found a regular job at the age of 60.

There is room for hope.

Good luck.


digioleg54
User

Jul 26, 2016, 10:44 AM

Post #65 of 65 (7999 views)
Re: [Laurent_R] I am loosing value of my argument [In reply to] Can't Post

you see, I don't know how to be free-lance consultant, I don't now the site and what is the procedure. If you explain me, I would appreciate it. You do it here or write to digioleg@yahoo.com
The last company doesn't have programmers. They use contract to fix some problems, I talked to them.

First page Previous page 1 2 3 Next page Last page  View All
 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives