subroutine
In Perl, how can I check from which module a given function was imported?
I have a code which calls the function. But I don\'t know the module th开发者_如何学Gois function belongs to. I need it to modify this function.[详细]
2023-01-15 21:06 分类:问答How to use threads to replace looping a subroutine in perl/pdl
I have a perfectly good perl subroutine written as part of a perl module. Without going into too many details, it takes a string and a short list as arguments (often taken from terminal) and spits out[详细]
2023-01-15 00:01 分类:问答How to handle subroutine redefined errors in Perl
So I have a file that in short has this problem... #!/usr/bin/perl -w package Foo; use strict; use POSIX;[详细]
2023-01-13 19:04 分类:问答Default argument values in subroutines
I don\'t know how to set default arguments for subroutines. Here is what I considered: sub hello { print @_ || \"Hello world\";[详细]
2023-01-12 10:31 分类:问答How can I tell which subroutine I'm in?
Is there a way to get the name of the enclosing subroutine of a piece of perl code? For example: sub foo 开发者_开发技巧{ print where_am_i(); }[详细]
2023-01-11 15:43 分类:问答Perl - Subroutine redefined
I have asked this question before or searched and seen others ask - why am I getting the warning \"Subroutine mySub redefined at ../lib/Common.pm line x\"? and you always get the answer you declared t[详细]
2023-01-10 09:24 分类:问答Getting a subroutine to return three seperate arrays of random numbers in C
I currently have code for a subroutine to return a pointer to an array.This array is a list of random numbers for a one dimensional monte-carlo integral.I am now trying to do a multi dimensional equiv[详细]
2023-01-10 06:31 分类:问答Subroutines in MIPS and other beginner silliness
I\'m using Project Euler to learn MIPS, specifically using Problem 6 to learn how to use a subroutine. Unfortunately, I am doing something very wrong because my answer that I\'m getting is far too lar[详细]
2023-01-08 06:12 分类:问答perl print array from subroutine
#! /usr/local/bin/perl sub getClusters { my @clusters = `/qbo/bin/getclusters|grep -v \'qboc33\'`; chomp(@clusters);[详细]
2023-01-06 19:25 分类:问答Matching n parentheses in perl regex
I\'ve got some data that I\'m parsing in Perl, and will be adding more and more differently formatted data in the near future.What I would like to do is write an easy-to-use function, that I could pas[详细]
2023-01-04 01:55 分类:问答