Re: Another Perl datatype headache ( scalars $, hashes %, and arrays @ )

2004-07-20 Thread gohaku
On Jul 19, 2004, at 9:46 AM, James Edward Gray II wrote: anyway, Is it possible to write scripts using only '$' instead of other prefix symbols? In other words, a php-style script written in perl Whether it is or not, it's not the answer to your problems. Start trying to make sense of the world yo

Another Perl datatype headache ( scalars $, hashes %, and arrays @ )

2004-07-18 Thread gohaku
ng only '$' instead of other prefix symbols? In other words, a php-style script written in perl Thanks in advance. -gohaku -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

questions about heredocs

2004-07-16 Thread gohaku
th the semicolon at the end of the first delimiter? I find that confusing. 2.) No documentation was found for [perldoc heredoc] and [perldoc heredocs], where is the documentation or examples that illustrate how to use heredocs in perl? 3.) How are heredocs stored in variables? Thanks in advance. -

Backticks alternative?

2004-07-05 Thread gohaku
confusing because it looks like a quote. Thanks in advance. -gohaku -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Adding Arrays as Hash Keys

2004-06-19 Thread gohaku
Array Merging... @[EMAIL PROTECTED]; #OR @[EMAIL PROTECTED] = ""; #...fin print join(" ",sort keys %VALS),"\n"; #1 2 3 4 5 TIA, -gohaku -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.o

Ways to Sort Returned Array?

2004-06-19 Thread gohaku
to be parenthesized. #sortarray.pl print join("\n",sort arraytest() ),"\n"; #This works --> print join("\n",sort (arraytest()) ),"\n"; #Don't know why this works --> print join("\n",sort &arraytest() ),"\n"; sub arraytest() {

Variables in qw?

2004-06-19 Thread gohaku
ee: #string_literal1 string_literal2 abc I realize I could do the following: @array = qw( string_literal1 string_literal2 ); push(@array,$string_variable); would like to hear if there is a shorter way... Thanks in advance. -gohaku -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

Making sense of \x00

2004-06-10 Thread gohaku
Hi everyone, Working with a .wav file, I get one of these values "\x00" and "\x00\x1b" which looks like hexadecimal characters. I tried sprintf, unpack, ord but I have no idea what I'm doing. can anybody tell me how to interpret these values. Thanks. with regards, -goh

The >> operator

2004-05-28 Thread gohaku
Hi all, I'm not sure if ">>" is an official operator in Perl but I have seen ">>" used in conjunction with HTML code or Long Strings. a google search and perldoc doesn't return any useful information. I am looking for code examples that use ">&

Re: Directory Listing

2004-04-21 Thread gohaku
On Apr 21, 2004, at 6:09 AM, Ryan Thomas wrote: I am relatively new at PERL and am learning it for a school project. What I would like to do is write a perl script that can run a complete directory listing including sub-directories and save the result to a text file. Not sure where to start.

Re: installing perl module without root permission

2004-04-09 Thread gohaku
On Apr 9, 2004, at 6:27 AM, Randal L. Schwartz wrote: Yes, and the instructions are included with your copy of Perl, in "perldoc perlmodinstall". What if perldoc is not included for some reason? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: inserting a string in between two other strings

2004-04-08 Thread gohaku
On Apr 8, 2004, at 1:01 PM, [EMAIL PROTECTED] wrote: Does anyone have a one liner using perl, awk or sed that will insert "mb" between the "6" and "f" ? For example, 144.06 free There's probably a shorter way but I have: $str = '144.06 free'; $str =~ s/6.*?free/6mb free/si; print $str; -- T

Re: Subroutine and @_ confusion

2004-04-05 Thread gohaku
On Apr 5, 2004, at 9:40 AM, [EMAIL PROTECTED] wrote: In a message dated 4/5/2004 7:52:33 AM Eastern Daylight Time, [EMAIL PROTECTED] writes: Hi People I'm trying to get a grip on passing @_ to subroutines. Or rather NOT passing it. I have a package: sub HLOM::Links::new { my ($class, %arg) =

Explanation of G Modifier

2004-04-04 Thread gohaku
tch or substitution in conjunction with the "/g" modifier to anchor the regular expression to the point just past where the last match occurred, i.e. the pos() point. Thanks in advance. -gohaku -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>