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.
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
So I have a file that in short has this problem... #!/usr/bin/perl -w package Foo; use strict; use POSIX;
I don\'t know how to set default arguments for subroutines. Here is what I considered: sub hello { print @_ || \"Hello world\";
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(); }
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
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
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
#! /usr/local/bin/perl sub getClusters { my @clusters = `/qbo/bin/getclusters|grep -v \'qboc33\'`; chomp(@clusters);
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