kunalrc has asked for the wisdom of the Perl Monks concerning the following question:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl & COBOL
by kcott (Archbishop) on Sep 03, 2013 at 18:52 UTC | |
G'day kunalrc, Welcome to the monastery. Unfortunately, what you've written doesn't make too much sense. For instance, what does "a list of variables and its associated names" mean? A variable, say $x, has the name $x: that's probably not what you're referring to. Perhaps you're talking about hash keys, references ... I'm really just making wild guesses; you need to tell us. Read "How do I post a question effectively?", then, following its guidelines, update your original post. [See "How do I change/delete my post?" if you don't know how to do that.] The title you used, "Perl & COBOL", seems to have no bearing on the question you're asking; it was certainly no help at all in trying to understand what your question meant. Read "How do I compose an effective node title?" and then, when updating your question, update the title also. When you've done all of that, you're much more likely to get useful answers to whatever it is that you're enquiring about. -- Ken | [reply] [d/l] [select] |
|
Re: Perl & COBOL
by marinersk (Priest) on Sep 03, 2013 at 21:54 UTC | |
How close am I? | [reply] |
|
Re: Perl & COBOL
by NetWallah (Canon) on Sep 03, 2013 at 23:06 UTC | |
If you show a few lines from each file (names file, COBOL file), then explain what you want changed, and how the final output should look, we can help you. We would be more inclined to help if you actually attempted to write perl code to generate the desired output, and had an actual perl-related problem with it, and explained what that issue was. My goal ... to kill off the slow brain cells that are holding me back from synergizing my knowledge of vertically integrated mobile platforms in local cloud-based content management system datafication. | [reply] |
|
Re: Perl & COBOL
by Laurent_R (Canon) on Sep 03, 2013 at 18:56 UTC | |
If you need to change a series of words by other words in a file, then say it. That is as much as I could guess from your message. If it is not what you want, then I guessed incorrectly, please explain further. And, yes, what is the relation with COBOL? | [reply] |
|
Re: Perl & COBOL
by marinersk (Priest) on Sep 04, 2013 at 10:14 UTC | |
Updated to fix <readmore> tags. (Apparently I'm in noob mode today) Updated to re-fix <readmore> tags. (Apparently I'm in serious noob mode today) Okay, I'll take a stab at bridging the gap. To understand this code you'll need to study up on the following Perl subjects: Presuming my assessment of what you want to do is correct, we have some files: The file varchange.txt contains our variable translation data: The TEST1.COB file has our COBOL source code: Read more... (2 kB)
And the file varchange.pl has our rather wordy and probably inefficient Perl script: Running the script produces: Read more... (2 kB)
Good luck, and holler if this is nothing like what you were looking for. Based on certain grammatical constructs in your original post, I am going to guess English is not your native language, so we might have to ask a lot of questions of each other to get past communication problems. I promise I'll do my best if you promise to be patient with me. :-) | [reply] [d/l] [select] |