Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

The Monastery Gates

( #131=superdoc: print w/replies, xml ) Need Help??

If you're new here please read PerlMonks FAQ
and Create a new user.

Quests
poll ideas quest 2021
Starts at: Jan 01, 2021 at 00:00
Ends at: Dec 31, 2021 at 23:59
Current Status: Active
11 replies by pollsters
    First, read How do I create a Poll?. Then suggest your poll here. Complete ideas are more likely to be used.

    Note that links may be used in choices but not in the title.

Perl News
CPAN clients exposed to sig-related vulnerabilities
on Nov 23, 2021 at 18:06
1 reply by hippo

    TL;DR - your CPAN client may be vulnerable to modified tarballs from untrusted mirrors (and will have been that way forever). Upgrade, force https, force signature verification and ensure it uses a trusted mirror by default.

    See the hackeriet.no post listing the vulnerabilities and this in-depth explanation of what is vulnerable and what to do about it.


    🦛

Sad News: David H Adler (DHA) has passed away
on Nov 22, 2021 at 18:07
1 reply by eyepopslikeamosquito

    Very sad to learn today of the recent passing of the lovely David H Adler Esq.

    Though I never met dha in person, I remember his delightful sense of humour from the London.pm mailing list years ago. I thought it strange that DHA was in New York, while I was in Sydney, yet we both relished the quirky sense of humour of the super-active London.pm mailing list back then.

    DHA's love of the fun side of Perl culture is also revealed in his only CPAN module: Semi::Semicolons

Supplications
Verify Town Name
3 direct replies — Read more / Contribute
by PilotinControl
on Nov 29, 2021 at 19:34

    Hello Fellow Monks!
    I have a perplexing issue with my code below. I am trying to verify a town name located in a file using it as a check and balance before moving on to the next user input. However no matter what is inputted it moves on with out giving notice stating the town name has not been found. Thanks in advance!

    sub addind { open(MYINPUTFILE, "townsdata.txt"); # OPEN FOR INPUT $| = 1; my @lines = <MYINPUTFILE>; # READ FILE INTO LIST print "INDUSTRY TOWN\n"; my $indtwn = <STDIN>; $indtwn = <STDIN> until defined $indtwn; chomp $indtwn; cls(); my $found = 0; foreach my $townverify (@lines) { my @field = split(':',$townverify); if ($field[0] =~ m/^#/) { next; } if ($field[1] =~ /(?<![\w-])$indtwn(?![\w-])/i) { cls(); $found = 1; } else { cls(); print "TOWN RECORD NOT FOUND\n"; sleep 3; cls(); addind(); } # END FOREACH FILE LOOP my $output="inddata.txt"; open(DAT,"+<$output") || die("Cannot Open File"); my $indline; $indline = <DAT> until eof DAT; my ($indid) = $indline =~ m/\A(\d+):/; print DAT (++$indid); print DAT (":"); print DAT ($indtwn); print DAT ("\n"); close (DAT); print "INDUSTRY SUCCESSFULLY ADDED!!\n"; sleep 3; cls(); industry(); }
    Data:
    1:PGH:Pittsburgh
    2:PGHW:Pittsburgh West End

To not capture recursive group while collecting certain matches
4 direct replies — Read more / Contribute
by Anonymous Monk
on Nov 29, 2021 at 04:55
    How regex match must not capture recursive group used and required inside when collecting all the matched captured groups?
    just illustration
    @m='lkjkljkjlkhkjkfjkfkvklkv'=~/^\w*(kl(?1)\w*).*?(kv)/g;
    How to manage m contains all matched kv correctly clean from matched recursive ?
Recalling a function iteratively
3 direct replies — Read more / Contribute
by dnamonk
on Nov 28, 2021 at 21:18
    Dear Monks, I have a general logic question. I need help in logic and not code. I have a question about recalling my function within a loop. Below is my code:
    List_new = myfunction() for items in List_new: if(my condition is TRUE): Execute some commands if(my condition is FALSE): recall myfunction()
    My problem is that I am loading "List_new" using myfunction(). How can I change "List_new" iteratively when my condition is False. I want to reload the function especially when the condition is FALSE. This means I keep calling the function until it is false and then execute the final output from myfunction(). Thank you in advance for your help.
running system commands, and getting return codes/status
3 direct replies — Read more / Contribute
by Anonymous Monk
on Nov 26, 2021 at 19:59

    Below is my code. It runs a backup program from a pTk GUI. My problem is at the 'system($cmd)' statement. The command gets executed before the message gets displayed in the text widget.

    I want a message that tells * is being done, then when the process is done a message that says * is done along with relevant error codes.

    Is there a better way to do this? And why are the messages displayed at the wrong time?

    my @cmd = ""; push (@cmd , $prog_args , $fullf +ile2 , "/" ); my $cmd2 = join " " , @cmd +; $text -> delete ('1.0' , 'end' ); $text -> insert ('end' , "\n" ); $text -> insert ('end' , "THIS +OPERATION SHOULD TAKE 5 min. to 15 min. \n ", 'highlite' ); my $exit_status = system( +$cmd2 ); print "\$exit_statu +s at L1447 =: $exit_status\n"; if ( 0 == $exit_sta +tus ) { $text -> insert ('end' , "\n\n" ); $text -> insert ('end' , "DONE! \n", 'h +ighlite' ); }
Perl DBI, Oracle truncating 30th character from the column name.
1 direct reply — Read more / Contribute
by Anonymous Monk
on Nov 26, 2021 at 06:14

    Hi Monks,

    While fetching data from Oracle db using Perl DBI, since column name is lengthy enough, oracle is truncating the 30th character from the column name, because of it's column length restriction it seems.

    Is there anything we can do using perl DBI to avoid this column name truncation from the result set.

    Thank you

How Perl can push array into array and then how retrieve
3 direct replies — Read more / Contribute
by Anonymous Monk
on Nov 24, 2021 at 22:59
    How do we correctly push array into array and then retrieve each of the outer array (explain both each separately clearly) ?
    illustrated
    my @f; my @e; for $i (0..40) { @e=($i+=2, $i+1); push($f,@e); # just it right ? } # how go on get it under multi array control

    Please help out, very thanked in advance
PerlMonks Discussions
Zombified user account on Selected Best Nodes
3 direct replies — Read more / Contribute
by Athanasius
on Dec 01, 2021 at 02:12

    Just noticed, Selected Best Nodes currently has dem bones in 12th place with a Rep of 137. This caught my eye because zombified accounts are supposed to have no write-ups. And no, this one doesn’t have any write-ups — the high-ranking node is the user page itself! I’m thinking something may be amiss here... ??

    Thanks for looking,

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2021-12-02 01:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (16 votes). Check out past polls.

    Notices?