, TX 78227
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
--
Aaron Priven, [EMAIL PROTECTED],com, http://www.priven.com/aaron
$a_really_long_variable_name\n;
$_ = sprintf (%.2f, (($_ /=1024) /=1024))
for $a_really_long_variable_name;
print $a_really_long_variable_name\n;
Both give the same output:
104857600
100.00
The latter is most useful if you really are iterating over a list, of
course.
--
Aaron Priven, [EMAIL
$hash{a};
that prints 5. But there's no way to do this with a lexical (my)
variable.
is this right?
--
Aaron Priven, [EMAIL PROTECTED],com, http://www.priven.com/aaron
to. Yay.
--
Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
the trick.
--
Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Oct 9, 2006, at 10:35 AM, Helliwell, Kim wrote:
#!/bin/perl
sub1(Hello, );
sub1(world\n);
sub sub2($str)
{
print $str;
}
sub sub1($str)
{
sub2($str)
}
Prototyping in perl does not do what you think it does. It does not
turn your arguments into variables. All it does is
See perldoc Exporter. If you use @EXPORT instead of @EXPORT_OK, it
will put those subroutines into the global namespace by default.
On Jul 20, 2006, at 3:09 AM, Shane Calimlim wrote:
I'd like to add some sub routines to the global namespace. I know
this is
usually considered bad design for
shortest way to add a list of random numbers ?
for example :
11
1
250
39
100
,
thanks
--
ibiokid
--
Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http
in some circumstances, bad in others.
--
Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
For a temporary file, you'd want to use the File::Temp module (see
http://search.cpan.org/~tjenness/File-Temp-0.16/Temp.pm ).
For a permanent file, such as a configuration file, you'd probably
have to figure it out for each operating system, and then test $^O to
figure out which operating
Check out the module Set::IntSpan and see if it does what you want.
http://search.cpan.org/dist/Set-IntSpan/IntSpan.pm
On Jul 12, 2006, at 3:08 PM, Ryan Moszynski wrote:
I need to write some code to allow users to specify which of a whole
bunch of elements(e.g.512/1024) that they want to
For what it's worth, ... is indeed a valid filename. Back in
Ancient Days of Yore, when I was a young undergrad at UC Santa Cruz
playing on the open-access timeshare Unix system, we all had read
access to each others' home directories, and it was somewhat common
for people to put
is that I need $dir
intact (ie
unchopped) after calling said subroutine, but it has been altered
by the chop.
--
Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http
On Jul 4, 2006, at 10:46 AM, Aaron Priven wrote:
you could pass it an expression that returns the value of $a.
Sorry, I should have said your variable instead of $a here.
--
Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron
--
To unsubscribe, e-mail: [EMAIL PROTECTED
14 matches
Mail list logo