Sponsored Content
Full Discussion: PHP code to Perl plx
Top Forums Shell Programming and Scripting PHP code to Perl plx Post 302842799 by durden_tyler on Saturday 10th of August 2013 11:40:07 AM
Old 08-10-2013
I don't quite understand.
Your code looks eerily similar to Perl code, but is obviously incorrect. So I guess it's PHP code (?)

If that's the case, then what does this "for" loop do in PHP?

Quote:
Originally Posted by tip78
...
Code:
...
for (my $g = 0; $g < length($l); $g++){
   $str.= chr(ord($l[$g]) ^ ord($h[$g % length($h)]));
}
...

...
And what are sample values of $l and $h?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Calling an Executable C file from the script (URGENT HELP PLX ! )

hi i'm trying to use tcl/tk on unix machine to call an executable C file .. i am trying just a simple button like this one button .list -text "LIST" -command filename pack .list -padx 10 -pady 10 but its giving me error message when i save it in a file eg script.tcl the button is... (7 Replies)
Discussion started by: phantom308
7 Replies

2. Web Development

php and perl on apache server

I'm having problems opening php and perl files on Apache. The server hasn't any association with those type of files by default and a window asking to choose a program to open them popups from the browser. How can I do to process them with the browser Thanks in advance. (1 Reply)
Discussion started by: capibolso
1 Replies

3. Web Development

I can't open my index.php page after insert php code

Hello guys, Does anyone can help me? I've just made my simple index.php without any code, but after insert session code to check if any user is authenticated, my index.php doesn't work anymore. Any fresh eyes could help me to see what and where the code is wrong? <? if... (6 Replies)
Discussion started by: metalfreakbr
6 Replies

4. Shell Programming and Scripting

perl: a way to see a sub code in debug mode: perl -de 0 ?

Is there a way to see or print a sub code? Sometime a sub could be already defined, but in the debug mode (so, interactively) it could be already out of screen. So, I would think about a way to check if the sub is defined (just 'defined' is not a problem) and how it is defined. Also, if... (4 Replies)
Discussion started by: alex_5161
4 Replies

5. Programming

Perl- How to catch the file in perl code?

Hi, plz see the below code , i have catch the file "Orders.20110714.out "file as a Orders*.out. but it giving me an error .it does not open the file. if the same thing i have done by code code-> ls Orders*.out then it gives me the output Orders.20110714.out i am trying apply the... (1 Reply)
Discussion started by: pspriyanka
1 Replies

6. Shell Programming and Scripting

php to perl help

Hey guys, I have some php code that I am trying to convert to perl code and I am having some probelms. I am posting my php to show what I am having difficulty converting. I know all the $_GET's will not work but I have taken care of that in my code. My main issue is with the bind_results, is... (2 Replies)
Discussion started by: Joey12
2 Replies

7. Shell Programming and Scripting

perl code

What is the meaning of below code, which is capturing from one file . $runDate = $1 if $str =~ m/,"TransactTime":"({10})/; # get transaction date as run date Is it the date from the first line of file or last line of file??? (Note:Each line from the file contains date) (2 Replies)
Discussion started by: aish11
2 Replies

8. Shell Programming and Scripting

PHP - add rm %dir to php code

Hello everyone, I'm trying to modify a php file to perform 2 actions in an if statement. // If the delete button is pressed if(isset($_GET) && isset($_GET)) { if(!mysql_query("DELETE FROM users WHERE User='".$_GET."'",$link)) ... (2 Replies)
Discussion started by: da1
2 Replies

9. Shell Programming and Scripting

Test Server - Forum Code Changes for PHP 5.3.10 to PHP 7

Here is some docs of my ongoing work to port this forum PHP code which is running on 5.3.10, to PHP 7. Motivation: Unfortunately, every thing that has a beginning must have an end. PHP 5.6 active support ended January 19, 2017. It will receive security support until December 31, 2018. #1 ... (7 Replies)
Discussion started by: Neo
7 Replies
JSON::RPC::Procedure(3pm)				User Contributed Perl Documentation				 JSON::RPC::Procedure(3pm)

NAME
JSON::RPC::Procedure - JSON-RPC Service attributes SYNOPSIS
package MyApp; use base ('JSON::RPC::Procedure'); sub sum : Public { my ($s, @arg) = @_; return $arg[0] + $arg[1]; } # or sub sum : Public(a, b) { my ($s, $obj) = @_; return $obj->{a} + $obj->{b}; } # or sub sum : Number(a:num, b:num) { my ($s, $obj) = @_; return $obj->{a} + $obj->{b}; } # private method can't be called by clients sub _foobar : Private { # ... } DESCRIPTION
Using this module, you can write a subroutine with a special attribute. Currently, in below attributes, only Public and Private are available. Others are same as Public. Public Means that a client can call this procedure. Private Means that a client can't call this procedure. Arr Means that its return values is an array object. Obj Means that its return values is a member object. Bit Bool Means that a return values is a "true" or "false". Num Means that its return values is a number. Str Means that its return values is a string. Nil None Means that its return values is a "null". TODO
Auto Service Description Type check SEE ALSO
<http://json-rpc.org/wd/JSON-RPC-1-1-WD-20060807.html> AUTHOR
Makamaka Hannyaharamitu, <makamaka[at]cpan.org> COPYRIGHT AND LICENSE
Copyright 2007 by Makamaka Hannyaharamitu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2008-09-01 JSON::RPC::Procedure(3pm)
All times are GMT -4. The time now is 11:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy