Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged perl

0 votes
1.1k views
1 answer
    How can I check whether a given string contains a certain substring, using Perl? More specifically, I want to ... in the given string variable. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
816 views
1 answer
    I'd like a daemonizer that can turn an arbitrary, generic script or command into a daemon. There are two ... demonizing of an arbitrary script: See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
877 views
1 answer
    I have been using Perl for some time, but today I came across this code: sub function1($$) { //snip } What does this mean in Perl? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
913 views
1 answer
    Doesn't work with other modules, but to give an example. I installed Text::CSV_XS with a CPAN setting: ' ... .so exists in the above directory See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
932 views
1 answer
    Don't want to sort the entries. using this does not preserve the order as well foreach my $val (keys %hash) { ... } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
784 views
1 answer
    What is the difference between library files and modules in Perl? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
789 views
1 answer
    A friend asked me this and I was stumped: Is there a way to craft a regular expression that matches a sequence of the ... it wouldn't match 'bbb', 'ccc', etc. Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
894 views
1 answer
    Some say we should use a lexical filehandle instead of a typeglob, like this: open $fh, $filename; But most ... ? Which one is considered a better practice? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    Please help me understand the following snippets: my $count = @array; my @copy = @array; my ($first) = @array; (my $copy = ... ; print($x = $y); print(@x = @y); Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
981 views
1 answer
    I'm using a hosted Linux machine so I don't have permissions to write into the /usr/lib directory. When I ... a module into some other directory and use it? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
760 views
1 answer
    I am not clear on the use/need of the G operator. I read in the perldoc: You use the G anchor to ... next match on the same string starts at the beginning. Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
705 views
1 answer
    From the documentation of XML::Simple: The use of this module in new code is discouraged. Other modules are available ... me what the key reasons for this are? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
759 views
1 answer
    It seems to me that many of the questions in the Perl tag could be solved if people would use: use ... why should a Perl developer use strict and warnings? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
932 views
1 answer
    Let's say you use a cpan (or otherwise external) module, like our fictional one here Stupid::CPAN::Module::OfSatan ... buggy-sig-die-handler-if-the-mechanism-to-debug-code-that-eve...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    According to the perldoc -f die, which documents $SIG{__DIE__} Although this feature was to be run only right before ... -a-sig-die-handler-that-does-not-trigger-in-eval-blocks...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
998 views
1 answer
    I'm trying to get a sum of a hash reference slice, but I am failing #!/usr/bin/env perl use strict; ... /stackoverflow.com/questions/65837342/how-to-do-sum-of-hash-reference-slice...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
836 views
1 answer
    my $a =10; my $b =200; my $c,$d; goto UP if ($a > 20); $d = $c + $b; print "$d "; ... /65840373/the-statements-inside-the-label-executes-even-if-the-condition-fails-can-anyone...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
968 views
1 answer
    Currently I am doing following #!/bin/bash -l #SBATCH --nodes=2 #SBATCH --ntasks-per-node=4 scontrol ... stackoverflow.com/questions/65844698/how-to-write-hostfile-in-slurm-script...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
850 views
1 answer
    Thinking I have narrowed down the issue, here is a better question. My script, 'index', opens an existing ... 65850001/session-data-not-being-updated-by-script-using-that-session...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
823 views
1 answer
    I am parsing through a file. The file format is like this: Column1 Column2 Column3 Column4 Column5 1 2 ... /preserving-blank-columns-adding-delimiters-when-reading-fixed-width-data...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
810 views
1 answer
    I don't understand what undef is doing in this snippet: $dbh->do (qq { INSERT INTO todo SET t = NOW(), status ... -is-the-purpose-of-passing-undef-to-dbis-do-method-in-this-context...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    I am trying to catch a timeout exception with IPC::Run on Windows 10 (using Strawberry Perl version 5.30.1): ... /65894141/how-to-catch-timeout-exception-with-ipcrun-on-windows-10...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
971 views
1 answer
    For anyone else reading this; it seems the issue was caused by permissions and suexec was part of the ... /questions/65894440/how-to-set-correct-file-permissions-with-cgisession...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
860 views
1 answer
    I'm not being able to select from SQLcipher database with DBD::SQLcipher. I tried various ways, ... stackoverflow.com/questions/65899956/dbdsqlcipher-prepare-nor-pragma-is-working...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
720 views
1 answer
    I am trying to replace a string in a text file using Perl script. The value gets replaced successfully. However, it ... -in-a-text-file-shifts-the-remaining-text-to-next-line...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
826 views
1 answer
    I'm listing a program to customly clean up a phonebook .vcf file. I can't figure out how to place in ... .com/questions/65910258/how-to-join-lines-in-between-2-conditions...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
956 views
1 answer
    Many Perl libs returns undef if something internal failed. For example with DBI : my $result = $sth->fetchrow_hashref(); ... 65919825/perl-die-if-a-variable-is-set-to-undef-correct...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
817 views
1 answer
    I have a fortran code with global comments, which start with a double exclamation mark (i.e., !!) and ... /how-to-replace-a-comment-line-which-start-with-specific-characters...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
To see more, click for the full list of questions or popular tags.
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...