subroutine
Global Variable, subroutine variable Question in Perl
How can I transfer the subroutine variable value into another subroutine variable, Can I use global variable.[详细]
2023-01-02 00:29 分类:问答File::Find and $_ in nested subroutines
When running the following code, the filenames of all files below C:\\Test are printed. Why doesn\'t it print just Hello (n times, depending on how many files are processed)?[详细]
2023-01-01 17:16 分类:问答How can I modify a scalar reference passed to a subroutine reference?
I have a function to convert documents into different formats, which then calls another function based on the type document. It\'s pretty straight forward for everything aside from HTML documents whic[详细]
2022-12-31 15:16 分类:问答Stopping other subs from running while in a Sub
Is there a way to stop other subs from running while in a separate sub. for instance say your in the sub[详细]
2022-12-31 12:52 分类:问答Can a Perl subroutine return data but keep processing?
Is there any way to have a subroutine send data back while still processing? For instance (this example used simply to illustrate) - a subroutine r开发者_运维技巧eads a file. While it is reading throu[详细]
2022-12-28 21:02 分类:问答Do I always have to provide Tkx's -command argument an anonymous subroutine?
I find it a bit weird that I have to wrap defined subroutines anonymously when specifying the -command argument for Tkx widgets.[详细]
2022-12-26 05:39 分类:问答Is there a Perl idiom which is the functional equivalent of calling a subroutine from within the substitution operator?
Perl allows ... $a = \"fee\"; $result = 1 + f($a) ; # invokes f with the argument $a but disallows, or rather doesn\'t do what I want ...[详细]
2022-12-25 21:12 分类:问答What does the function declaration "sub function($$)" mean?
I have been using Perl for some time, but today I开发者_开发技巧 came across this code: sub function1($$)[详细]
2022-12-24 15:53 分类:问答Fortran arrays and subroutines (sub arrays)
I\'m going through a Fortran code, and one bit has me a little puzzled. There is a subroutine, say SUBROUTINE SSUB(X,...)[详细]
2022-12-23 14:54 分类:问答How can I pass a constant to a Perl subroutine?
I have got as follows: use constant ABC =&g开发者_开发知识库t; (\'one\', \'two\', \'three\');[详细]
2022-12-23 13:02 分类:问答