you have a question on how to do something in Perl, or
you need a Perl solution to an actual real-life problem, or
you're unsure why something you've tried just isn't working...
then this section is the place to ask. Post a new question!
However, you might consider asking in the chatterbox first (if you're a
registered user). The response time tends to be quicker, and if it turns
out that the problem/solutions are too much for the cb to handle, the
kind monks will be sure to direct you here.
Hi Perl Monks,
I have the below two hash of array of hashes.I need to compare these two array of hashes,each and every field needs to be compared.I cant use diff, I need to do it without using any inbuilt functions.
Please help me out with this as I am really new to Perl.
Thanks a lot in advance.
HASH OF ARRAY OF HASHES 1:
As you can see it just runs over the input file with -n, putting it into a scalar. Then Perl::Tidys that scalar, then puts it back.
It works in every other way just as I'd like, but when it encounters unicode characters (I've been working on some Russian text and need to recognise these chars: 'ОЕАИН') it replaces them with question marks.
I can't add command-line flags like -CIO, that's not allowed. I've tried adding binmode STDOUT, ":utf8" and binmode STDIN, ":utf8" to the BEGIN block but that hasn't changed anything.
Of course I can use Perl::Tidy in other ways, but I'm used to this utility and would like to get it working again in a way I can trust, it's become a habit.
As the title hints, I would like to break apart mp4 videos to animation and sound, so these may be edited, and recombined, to form an edited version of the mp4 file.
My question is: do you know of any good and reliable modules that can help me do so ?
I have a little calc I wrote in perl that really just provides and eval & print loop for the user.
I have made changes over the years, but one of the things that has always bothered me is, if I want to add a complex expression -- anything that is multi-lined, how to get my input loop to know when it needs more input OR when it doesn't (vs. _could_ take more input).
My 'semi-model' for that would be something like bash, where if you type 'the beginning of a control structure, bash will change to a different prompt to indicate it wants more input.
How might I do the same in my eval/print loop?
As it is now, I can define functions on 1 line, for example, but there is no easy way to extend that to more than one line.
I could force the use of an 'extend char', like backslash at the end of line -- but in bash, those are only needed if it is ambiguous -- i.e. if the line is already well formed, you need to enter '\' to tell bash to keep parsing. Ex. (using 'home>' as normal prompt):
On the 2nd line, it doesn't display the normal prompt, but a single
greater than sign. How could I get my input/eval loop to get feedback
from perl that I'm in the middle of a similar structure and change the
prompt and not try to eval it?
Clarification: how can I do that w/o writing an entire perl parser? ;-)