[install and use local::lib module]

2024-02-15 Thread Maxim Abalenkov
9-0/lib/POD2/DE/local .cpan/build/local-lib-2.29-0/lib/local But they are in the “build” directory. This is a little bit suspicious. Am I missing some installation steps? Would you please help me to install “local::lib” correctly? Thank you very much and have a wonderful day ahead! — Best wishe

[getting PAUSE account]

2023-12-23 Thread Maxim Abalenkov
patient or is the advice in the book no longer relevant? Please let me know. Thank you and have a good day ahead! -- Best wishes, Maxim Maxim Abalenkov \\ maxim.abalen...@gmail.com +44 7 486 486 505 \\ www.maxim.abalenkov.uk

Re: array help

2006-07-20 Thread Maxim
ound"); > print @test; > > i am getting output as follows > > /test/playground > > i need the output in following fasion > > /test > /playground > > can you please tell me what is wrong? > > Regards > Irfan. -- Maxim -- To unsub

Re: Newbie Perl Question

2006-07-17 Thread Maxim
) > { > /^DR\d+.*?(\d+).*?(\d+)(.+)/ > and print "$1;", 0+$2, ";$3\n" ; > } > > If your data is in pqd.in, and pqd.pl is execuable, then just run it as > > pqd.pl pqd.in > > -- > Affijn, Ruud > > "Gewoon is een tijg

Re[2]: Code clean up help ---- PLEASE

2002-01-11 Thread Maxim Berlin
code!!! ) sub >> that needs to be cleaned up. I am not to sure on how todo >> this... I have >> ideas etc.. but would like info as to a cleaner more professional way. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: AdminMisc::GetHostName Question

2002-01-04 Thread Maxim Berlin
mputer - DNS server. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: REGEXP Help on Linux

2002-01-04 Thread Maxim Berlin
not know why this doesn't work: Prompt => DJH> '/\[$::username\@$::machine\]\$$/'. because you do not understand difference between '/\[$::username\@$::machine\]\$$/' and "/\[$::username\@$::machine\]\$$/" try print '/\[$::username\@$::machine\]\$$/&

Re[2]: Computer connected to the internet?

2002-01-04 Thread Maxim Berlin
at modules at http://search.cpan.org/search?mode=module&query=ping Things, which shows you, that system is NOT connected: 1. you can not reach your default gateway 2. you can not operate with your provider's DNS server(s) addresses of gateway and DNS servers you can obtain by run

Re: UUCP and perl (or any alternatives)

2002-01-04 Thread Maxim Berlin
ut this is proving problematic. DP> Are there any lightweight alternatives? Has anyone got a better way DP> to do this than uucp or had trouble getting this to work? hmmm... what about [t]ftp? Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mai

Re: Computer connected to the internet?

2002-01-04 Thread Maxim Berlin
Hello Gary, Friday, January 04, 2002, Gary Hawkins <[EMAIL PROTECTED]> wrote: GH> How can I check whether the system is connected? GH> Want to pause the script if connection is lost. your OS? and your connection type? Best wishes, Maximmailto:[EMA

Re[2]: Best perl on windows?

2002-01-04 Thread Maxim Berlin
ences. just for your information: you can avoid these two things - http://cygwin.com/ with cygwin you can run, for examples, Xfree server on windows computer. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: add text to the end of a word. HELP!!

2002-01-01 Thread Maxim Berlin
oc -f open for "+", ">", ">>" modifiers. and, may be you should check 'seek' function. perldoc -f seek "You can't usually use either read-write mode for updating textfiles, since they have variable length records. See the -i swit

Re: Making Cygwin and Apache and Perl Play Nice

2001-12-31 Thread Maxim Berlin
LSBIN DOC INFO LIBEXEC MAN SHARE RSC> Is this RSC> something I can change under Apache (I'm running 1.3)? hmmm... no. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: help with DBD error

2001-12-20 Thread Maxim Berlin
ct($data_source, $username, $password); FJC> 104 my $sth2 = $dbh2 -> prepare("insert into history(num,title,date,user1)values('$num','$date1','$date1','$name')"); FJC> 105 FJC> 106 FJC> 107 $sth2 -> execute

Re[2]: Data through the parallel port

2001-12-20 Thread Maxim Berlin
functions by running 'perldoc perlfunc'. If you really need interface to lpt port, write your own module (in C, you call it library), in C and use them. see 'perldoc perlxs' for more details. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubs

Re: client-server communication

2001-12-14 Thread Maxim Berlin
hanks in advance. unfortunatelly, you've got bad examples... take a look at perldoc perlipc , which contains working client/server samples. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: calling a server via http

2001-12-08 Thread Maxim Berlin
ay, 20 seconds - because the server needs to be restarted. take a look at sample in perldoc -f alarm to load page from http server, you can use lynx, of course, but i suggest you to use perl module 'LWP'. perldoc LWP::Simple perldoc LWP Best wishes, Maximmail

Re: shifting scalars ??

2001-12-08 Thread Maxim Berlin
homp; CI> if $_ =~ ? # this is where I'm getting lost, want to CI> compare $_ from above () to $_ from () $b=$_; if $b =~ $a CI> then I'm just printing my diffs so I can correc the necessary files. Best wishes, Maximmailto:[EMAIL

Re: PERL MySQL DBI

2001-12-06 Thread Maxim Berlin
t existingemail is an AS> optional field. If there is no email address given, I would like to AS> print out "NO EMAIL PROVIDED". How do I do this within my while loop. AS> When this report is run, it is piped to a csv file so that it can easily AS> be imported into Excel. Th

Re[4]: "q" as an argument

2001-12-05 Thread Maxim Berlin
Hello Michael, Wednesday, December 05, 2001, Michael McQuarrie <[EMAIL PROTECTED]> wrote: MM> Maxim, MM> Correction: MM> The "use strict;" requires the arguments to all be quoted. yes. MM> In the real script I am only using "use strict 'vars';"

Re: Loop

2001-12-05 Thread Maxim Berlin
lse { PC> PC> break; PC> } PC> } PC> the break statement is not working. Even when it comes into the else part, PC> it doesn't break the for loop. PC> Suggestions? perldoc -f last Best wishes, Maximmailto:[EMAIL PROTECTED] --

Re: "q" as an argument

2001-12-05 Thread Maxim Berlin
ed as a quote operator. MM> I am using a \w to try and match all invalid options but \w will MM> not match the q. Anyone know a way around this? I would like to MM> keep the same syntax for calling the sub. i suggest you to put use strict; line at the top of your source and run perl -c yoursource to check syntax. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Pattern match woos

2001-12-05 Thread Maxim Berlin
w is [a-zA-Z0-9_] if you want to separate letters and digits, you need something like this: ($code,$num) = ( $p =~ /^([a-zA-Z]+)(\d+)/ ); Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: Simpler....

2001-12-05 Thread Maxim Berlin
com/pub/a/language/info/software.html http://www.activestate.com/ SS> Also, any pointers for basic tutorials? http://perl.oreilly.com/ http://learn.perl.org/ http://www.perl.org/ Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROT

Re: Does Perl have an equivalent of C's #include

2001-12-05 Thread Maxim Berlin
Hello Andrew, Wednesday, December 05, 2001, Andrew Clark <[EMAIL PROTECTED]> wrote: AC> The subject says it all. AC> R, AC> AJFC AC> Please CC replys, I'm not on the list. perldoc -f require perldoc -f use Best wishes, Maximmailto:[EMA

Re: Simpler....

2001-12-05 Thread Maxim Berlin
> elsif ($status == 1) { DF> #Do this other sub... DF> sub2(); DF> } else { DF> #Continue while loop... DF> } DF> } DF> Can I make it smaller. I want to know this to improve my Perl skills. perldoc -q switch Best wishes, Maxim

Re[4]: What's wrong with unlink?

2001-12-04 Thread Maxim Berlin
Hello Tirthankar, Tuesday, December 04, 2001, Tirthankar C. Patnaik <[EMAIL PROTECTED]> wrote: TCP> Hi Maxim, >> no :) you forgot to escape backslash. but there is no difference >> between \ and / slashes in path names in perl for windows. >> TCP> Thanks for t

Re[2]: UID's

2001-12-04 Thread Maxim Berlin
a = ($uid + 1); CR> bit shitty if your pass files get's to long. so what? open (TFH," ) { ($user,$pass,$uid,$gid,$info,$home,$type) = split /:/, $line; } Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTE

Re[2]: problem executing linux command in perl

2001-12-04 Thread Maxim Berlin
t; RG> To: <[EMAIL PROTECTED]>; John W. Krahn <[EMAIL PROTECTED]> RG> Sent: Tuesday, December 04, 2001 6:57 PM RG> Subject: Re: problem executing linux command in perl RG> chmod 0777, $r_file or die "Cannot chmod $r_file: $!"; RG> giving error : RG> error :Can

Re: UID's

2001-12-04 Thread Maxim Berlin
an write my @uids=`tail -n5 /etc/passwd | cut -d: -f3`; what do you need, exactly? trying to parse /etc/passwd? take a look at sample in perldoc -f split Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: Can Perl work like Expect?

2001-12-04 Thread Maxim Berlin
mode=module&query=sftp AM> By the way, Are these modules installed by default on the Perl AM> distributions? by default - no. AM> Or, how can I tell if a module is installed or not? something like perl -e "use Net::FTP;" if module is not installed, you'll recie

Re[2]: create an NT user with Perl

2001-12-04 Thread Maxim Berlin
Hello Jorge, Tuesday, December 04, 2001, Jorge Goncalvez <[EMAIL PROTECTED]> wrote: JG> HI, I wonder if there is a way to create an NT user with Perl? take a look at net.exe program. try net help net help user Best wishes, Maximmailto:[EMAIL PROTECTED]

Re[2]: What's wrong with unlink?

2001-12-04 Thread Maxim Berlin
in perl for windows. second, unlink <$_path/*> does not works. can be my $_path = "c:/EventLogs"; if( -d $_path ) { chdir $_path; unlink <*> or die $!; } Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: Can Perl work like Expect?

2001-12-04 Thread Maxim Berlin
t; >> >> Yep -- there's a module on CPAN called Expect.pm. It works as you would >> expect. :-) Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: a beginners challenge

2001-11-30 Thread Maxim Berlin
, please contact me, not [EMAIL PROTECTED] Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: perl and html tables?

2001-11-30 Thread Maxim Berlin
gt; Can anyone provide an example of how to do this or point me in the CS> right direction. something like this? print ''; while ( @record = $sth->fetchrow_array() ) { print ''; foreach my $r (@record) { print "$r"; } print ''; } print 

Re: a beginners challenge

2001-11-30 Thread Maxim Berlin
a directory >> files that are at least 3 days old. >> Good luck all, >> You're welcome to pick who you think is the winner. you already has solution. do you want it especially in perl? ok ;) @result= `find . -newerct \'3 days ago\' -maxdepth 1 -exec rm \{\} \\;`;

Re: Fork ??

2001-11-30 Thread Maxim Berlin
will run at the same time as the original process and everyone will be R> able to do their thing?? is this correct? Sorry for the newbie question. you can read perldoc -f fork man fork but, i'm afraid, fork is very difficult for beginner. there is no basic syntax, just $pid=fork(). Best wishes,

Re: CPAN usage

2001-11-30 Thread Maxim Berlin
your.cpan.site/CPAN/] ], Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: shadow file

2001-11-22 Thread Maxim Berlin
apache, you can read http://httpd.apache.org/docs-2.0/suexec.html too. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: REGEX or Parse a text file

2001-11-14 Thread Maxim Berlin
mpressed Size/; DP> } DP> print OUTPUT "$file $bar \n"; move your print inside if (/Raw/) { } to avoid useless repetitions. while () { chomp; if (/File Name: /) { $name = $'; } if (/Raw/) { $size = $'; $si

Re: HELP - I am trying to connect to a MySql database

2001-11-14 Thread Maxim Berlin
tabase. use my $database= 'mydatabase:localhost'; and see perldoc DBD::mysql for more information: $driver = "mysql"; $dsn = "DBI:$driver:database=$database;host=$hostname;port=$port"; $dbh = DBI->connect($dsn, $user, $password); Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Off-Topic (200%) - Where are you from?

2001-11-09 Thread Maxim Berlin
Hello, looks like i'm only one from Russia (Moscow) here... Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: [Socket] Question

2001-11-09 Thread Maxim Berlin
t. well, try to select(TO_SERVER); $| = 1; select(STDOUT); then. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: merging two hashes together?

2001-11-03 Thread Maxim Berlin
("four" => 4, "five" => 5, "six" => 6); WD> my %h3 = (); WD> mergehash( \%h1, \%h2, \%h3); WD> sub mergehash { WD> my ( $h1, $h2, $h3) = @_; WD> foreach my $MyKey1 ( keys %{$h1} ) { WD> $h3->{$MyKey1} = $h1-&g

Re: Reference's ?

2001-11-03 Thread Maxim Berlin
location for AJHRe> "C"? AJHRe> #!/usr/bin/perl -w AJHRe> @letters=("A", "B", "C"); something like this? #!/usr/bin/perl -w @letters=("A", "B", "C"); sub replace { my ($ref)=(@_); $ref->[2]="D"; } repla

Re: terminating input

2001-11-02 Thread Maxim Berlin
ition, because $i changed after input. JC> but still not having much luck. Any ideas? something like $i=-1; do{ $i++; chomp($value[$i] = ); } until (!$value[$i]); Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: gethostbyname and getnetbyname

2001-11-02 Thread Maxim Berlin
e and the hostname.foo.com notation and it does not WN> work. WN> It does work when I replace $nodename with 'node.foo.com' but I WN> can't get the imputed variable to work? perldoc -f chomp Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: gethostbyname and getnetbyname

2001-11-02 Thread Maxim Berlin
this not set up for that? $nodename='node.foo.com'; $ent=gethostbyname($nodename); where is your problem? example: use Socket; use Net::hostent; $h = gethostbyname("www.perl.com"); print "name:", $h->name," address:",inet_ntoa($h->ad

Re[2]: Outputting shell command to a browser

2001-11-02 Thread Maxim Berlin
erver|system logs and configuration. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: STDERR

2001-10-27 Thread Maxim Berlin
lt? WG> How can I redirect it to a specific file? see perldoc -q "How can I capture STDERR from an external command" basically, system("program args 1>/tmp/program.stdout 2>/tmp/program.stderr"); Best wishes, Maximmailto:[EMAIL PROTECTED

Re: please help with fork

2001-10-27 Thread Maxim Berlin
Hello Maxim, Saturday, October 27, 2001, Maxim Goncharov <[EMAIL PROTECTED]> wrote: MG> I need help with understanding what is happening when I fork a MG> process.Here is actual code: you did not 'fork' process. 'fork' is very special function, see perldoc -f fo

please help with fork

2001-10-27 Thread Maxim Goncharov
HI everyone, I need help with understanding what is happening when I fork a process.Here is actual code: #!/usr/bin/perl -w use strict; use Fcntl qw(:DEFAULT :flock); use POSIX; #use Mail::Mailer; my ($pid); $pid = open(HHH,"| infloop"); if($pid){ print HHH "bla bla \n"; } where infloop i

Re: wats wrong?

2001-10-27 Thread Maxim Berlin
Ar!! Be easy, friend :) Be simple: while (<>) { last if (m/^\s*model\s*tiny.*/i); } , and terminator never stands after you :) p> If can everybody can tell me whats wrong here i can sleep safly... Thanls!!! Best wishes, Maximma

Re: Net::Telnet

2001-10-27 Thread Maxim Berlin
by your prompt value on your HOST next, you forgot $telnet->open(HOST); JE>$telnet->login(USER,PASS); JE> my @lines = $telnet->cmd($command); JE> print @lines; JE>$telnet->close; JE> ## JE> " and see perldoc Net::Telnet for more examples. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: problem with 'use strict'

2001-10-26 Thread Maxim Berlin
001] a.pl: Global symbol "$sth" requires explicit package name at a.pl line 21. [Sat Oct 27 01:14:05 2001] a.pl: Global symbol "$current_date" requires explicit package name at a.pl line 32. read perldoc perlmod for more information. by the way, don ot use '&' to call function; it' not neccessary. take a look at perldoc perlsub Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

weird forks

2001-10-25 Thread Maxim Goncharov
Hi all, I ran into the problem with forking and I am not able to figure out what happens. Here is the code (let's call the program server): $pid = open(HHH,"|- "); if($pid){ print HHH "something\n"; }else{ exec "client" } Notice that I do not call close(HHH) because I want the parent just t

need help with forking

2001-10-25 Thread Maxim Goncharov
Hi all, I ran into the problem with forking and I am not able to figure out what happens. Here is the code (let's call the program server): $pid = open(HHH,"|- "); if($pid){ print HHH "something\n"; }else{ exec "client" } Notice that I do not call close(HHH) because I want the parent just to

weird problem with forking

2001-10-25 Thread Maxim Goncharov
Hi all, I ran into the problem with forking and I am not able to figure out what happens. Here is the code (let's call the program server): $pid = open(HHH,"|- "); if($pid){ print HHH "something\n"; }else{ exec "client" } Notice that I do not call close(HHH) because I want the parent just t

Re: Search and replace using a variable

2001-09-13 Thread Maxim Berlin
un this against config.cfg, it gives me the string OAM... Can I JL> make that a variable? yes :) Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: "system" command failure

2001-09-12 Thread Maxim Berlin
ero/inputConversions/Bin2Ascii/bin2ascRunScript.bat'; TC>$status = system("source $file); syntax error here - no closing " TC># Ive also tried $status = system("source", $file); well... but where is your FORTRAN program? /trinidad/uamaero/inputConversions/Bin2

Re[2]: line end problems - help #2

2001-09-12 Thread Maxim Berlin
o fix CP> it, use an inplace edit: CP> perl -pi -e 's/\r//g' somescript.pl CP> Just be sure to back up the file first! -i does backup for you ? Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

Re[2]: line end problems - help #2

2001-09-12 Thread Maxim Berlin
nux. this is a long song, but i can sing, if anyone is interested :) RW> Thanks but no cigar yet ;-) no smoking:) want to die at full health :) (sort of humor) Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: line end problems - help #2

2001-09-12 Thread Maxim Berlin
e between windows and linux, switch your ftp client to 'ascii' mode. If not, tell your editor to save output file in unix format. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: '' and ""

2001-09-12 Thread Maxim Berlin
side loop, for example. MP> perl to see if variables resides inside quotes, but don't know if this is MP> significant to bother with single quotes. personally, i prefer '' in next case: my $a = "\$\@\^"; my $a = '$@^'; MP> ps. I've always used

Re: timestr (benhcmark)

2001-09-10 Thread Maxim Berlin
lt;2> n main::(t.pl:6): print "loops took:",timestr($t),"\n"; DB<2> n loops took: 0 wallclock secs ( 0.22 usr + 0.00 sys = 0.22 CPU) Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Need help on setuid script.

2001-09-01 Thread Maxim Berlin
; allow perl to complete the action, or am I out of luck, stuck kluging the MS> script in ksh. if you have apache web server, take a look at suexec. http://www.apache.org/docs-2.0/suexec.html Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [

Re: adding element to array if a match found

2001-09-01 Thread Maxim Berlin
3:field5 JL> am I crazy for saying I could do this? no. JL> Until today I considered myself a novice Perl programmer, but now JL> I'm not so sure. Any help would be greatly appreciated! please show us your code? Best wishes, Maximmailto:[EMAIL PRO

Re: Reading backwards

2001-09-01 Thread Maxim Berlin
doc -f seek) and tell (perldoc -f tell). here is sample(taken from fido7.ru.perl, author Dmitriy Goldobin ): sub PrintReverse { open FILE, shift; binmode FILE; seek FILE, 0, 2; my $chunk = ""; for( my $pos = tell(FILE) & ~2047; $pos >= 0; $pos -= 2048 ) {

Re: Interpolating function call in here documents causes out-of-order execution

2001-09-01 Thread Maxim Berlin
er execution path, Am I doing something YG> wrong ? no. your 'print <<"TARGET"' prints TARGET _after_ constructing all TARGET content. try sub interp { my ($arg) = @_ ; return "Hello World, $arg \n" ; } Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: Help with Recursive script on Large Directory

2001-08-28 Thread Maxim Berlin
ot need that &, so don't use it, it's dangerous. example: sub a { print "sub\n"; } print "test" &a; i've missed ';' after 'print "test"', and now i got print "test" & a; construction. very difficult to find. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: Writing a log file?

2001-08-28 Thread Maxim Berlin
;t know. yes, it's possible via perl debugger and $ENV{PERLDB_OPT}. perldoc perldebug search for "UsageOnly" Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Help with Recursive script on Large Directory

2001-08-28 Thread Maxim Berlin
next; KJ> } KJ> if(((-M $file) > 60) && ((-s $file) > 1024 ** 2 * 50 )) { KJ> print LOG "$workdir/$file\n"; KJ>

Re[10]: Stripping line breaks

2001-08-26 Thread Maxim Berlin
iable!$regex!; >> CS> Well, in this case, I don't see a problem. The contents of $variable (and sorry, my mistake. in that case regex works correctly. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[8]: Stripping line breaks

2001-08-25 Thread Maxim Berlin
ou are using s!!!g, then surely you will know what CS> will be, even if you don't know the contents of that variable. no. CS> or am I misunderstanding you? may be. example: $regex=; chomp $regex; $variable=; chomp $variable; $a =~ s!$variable!$regex!; any ideas? Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[6]: Stripping line breaks

2001-08-25 Thread Maxim Berlin
e (I believe) any non-alphanumeric character as a regex CS> delimiter. I like !, /, ^, and {} personally. :) what if i don't know variable name? $! is $OS_ERROR, $ERRNO $/ is $INPUT_RECORD_SEPARATOR, $RS $^ is $FORMAT_TOP_NAME well, ${ unassigned now... Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[4]: Stripping line breaks

2001-08-25 Thread Maxim Berlin
rnate CS> delimiters. ok, what about "$!" ? use @? what about "$@"? and so on... Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: Stripping line breaks

2001-08-25 Thread Maxim Berlin
re. am i ROC> right in assuming regex needed for this? in perl way, yes. something like $a="a\nb\nc\nd\n\n\n"; $b=$/; $a =~ s/$b//g; alternativelly, you can take a look at perldoc -f substr Best wishes, Maximmailto:[EMAIL PROTECTED] p.s. does anyone know

Re: Stripping line breaks

2001-08-25 Thread Maxim Berlin
Hello Rory, Saturday, August 25, 2001, Rory O'Connor <[EMAIL PROTECTED]> wrote: ROC> Another quick one - how can I easily strip line break characters from a ROC> variable? see perldoc -f chomp Best wishes, Maximmailto:[EMAIL PROTECTED] --

Re: Getting the time

2001-08-25 Thread Maxim Berlin
ou mean? NTP? or you need local time from your computer? see perldoc -f localtime Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [ sort ]

2001-08-24 Thread Maxim Berlin
n. I've written it M> in many ways, but it still sorting by second column. M> Could you help me solve this problem? for (sort {$a <=> $b} keys %map) { printf("%d;%d\n", $_, $map{$_}); } Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: is this sub called correctly? am I missing something?

2001-08-23 Thread Maxim Berlin
nd show us output. BK> $rec{$db_cols[$i]} = $data[$i]; BK> } BK> last LINE; BK> } BK> } BK> close DB; BK> $found ? BK> (return %rec) : BK>

Re: redirecting print output to a variable

2001-08-23 Thread Maxim Berlin
sure, that have correctly understand you. may be you need this? $generatedCode = '$test = "some result"; print "test is: $test";'; $generatedCode =~ s/print /return /; my $testvar = eval "$generatedCode"; print "testvar=$testvar"; Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: a1.a2.a3.a4 -> integer

2001-08-23 Thread Maxim Berlin
ke this: sub ip2ul { return unpack( 'N', pack( 'C4', split( /\./, shift ) ) ); } sub ul2ip { return join( '.', unpack( 'C4', pack( 'N', shift ) ) ); } (receipts stolen from russian fido7.ru.perl group) Best wishes, Maxim

Re: Having a problem with sendmail

2001-08-21 Thread Maxim Berlin
nd_mail CSM> print "Content-type: text/html\n\n"; CSM> print <<"EOF"; CSM> CSM> CSM> Sent email: CSM> $from CSM> $email CSM> $subject CSM> $messagebody CSM> CSM> CSM> EOF CSM> ---- CSM> Sorry remedial ques

Re: k-shell case statement

2001-08-20 Thread Maxim Berlin
Hello Robert, Tuesday, August 21, 2001, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Ric> What is the best perl example of a k-shell case statement as follows: Ric> case "$VAR1" Ric> in take a look at "Basic BLOCKs and Switch Statements" in p

Re: chomp & list

2001-08-20 Thread Maxim Berlin
eciated what is your environment? you can get above result if, for example, you have created myfile.txt in windows ($/=\r\n), tranfers myfile.txt to unix-like OS ($/=\n) in binary mode, and then run your script in unix. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Not working in Netscape, working in IE

2001-08-13 Thread Maxim Berlin
tscape...any solution RG> RG> just add empty line after Content-type : text/html Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: SMTO Socket Connection

2001-08-13 Thread Maxim Berlin
JD>b) Any guideline on how to improve my code perldoc Net::SMTP use Net::SMTP; $smtp = Net::SMTP->new('mailhost'); $smtp->mail($ENV{USER}); $smtp->to('postmaster'); $smtp->data(); $smtp->datase

Re: Recursive file copy

2001-08-09 Thread Maxim Berlin
/$dir_name"); pn> } pn> ### end of main pn> ## pn> Sub myMkDir pn> ## pn> sub myMkDir { pn> my $dir = shift; pn> if (-e $dir) { pn> if (!(-d $dir)) { pn> # Exist, but not a directory, it

Re: Compare large files memory error

2001-08-07 Thread Maxim Berlin
while( $a= ) { $b=; if ($a ne $b) { $retval=0; last; } } close IN1; close IN2; return $retval; at the beginning, you can compare files size (perldoc -f stat). Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: perl interpreter

2001-08-01 Thread Maxim Berlin
//www.mysql.com/downloads/os-win32.html. he is very old, but still works. But, here you will have problems with new modules which you will install - you will need win32 C compiler. decision is yours. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe,

Re: readdir

2001-07-27 Thread Maxim Berlin
ans CFFDT> temp.htm $!\n"; CFFDT> } CFFDT> if (/DATA\/unnoir.gif/) {last}; CFFDT> } CFFDT> close(FICHIER); CFFDT> close(TEMP); CFFDT> } CFFDT> closedir LMI; Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: if in a list

2001-07-26 Thread Maxim Berlin
$boolean = 1; JP> else JP> $boolean = 0; JP> } JP> is there a more elegant way to do it? $boolean = grep /AF1/,@mylist; perldoc -f grep Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[2]: if in a list

2001-07-26 Thread Maxim Berlin
Hello Jennifer, Thursday, July 26, 2001, Maxim Berlin <[EMAIL PROTECTED]> wrote: MB> $boolean = grep /AF1/,@mylist; sorry, incorrect sample. should be: $boolean = grep /^AF1$/,@mylist; with first regexp you catch every string, that contain 'AF1'. thanks to Moone

Re: Reading binary files

2001-07-26 Thread Maxim Berlin
mode'. perldoc -f binmode Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Arrays as subroutines arguments

2001-07-26 Thread Maxim Berlin
$$ref2[0]; } see perldoc perlref for more. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: help with email submit

2001-07-21 Thread Maxim Berlin
me in the right direction. if you need to send email(s), take a look at Net::SMTP module. perldoc Net::SMTP if you have it already installed, or http://search.cpan.org/doc/GBARR/libnet-1.0703/Net/SMTP.pm otherwise. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsu

Re: split

2001-07-21 Thread Maxim Berlin
... G> @_ = ($hour, $minute, $second, $frame, $crap1, $crap2, $crap3, $crap4) = G> split(/:/,$line); (if i correctly understand you) try split(/[: ]/,$line); Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re[2]: module question

2001-07-20 Thread Maxim Berlin
nce(\%wdf), so you should use pointer. see perldoc perlref for more information. Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

  1   2   >