CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: General Discussions: Feedback:
[perl] tag doesn't work

 



bulrush
Novice

Jul 9, 2014, 3:37 AM

Post #1 of 6 (56545 views)
[perl] tag doesn't work Can't Post

I'm trying to post here with Firefox 29.0 on Win 7. When I use [perl][/perl] tags, they don't do anything. Example Perl tag use below.

[perl]
$prefixsp=' ';
$authuser='auth@server.com'; # SMTP login name.
$authpw='userpw';
$fileattach=$fnout;
[/perl]

What could be wrong here?

Thanks.
-----
* Redhat Linux RHEL 5.5.56
* Perl 5.8.8

(This post was edited by bulrush on Jul 10, 2014, 5:09 AM)


Zhris
Enthusiast

Jul 9, 2014, 5:23 AM

Post #2 of 6 (56529 views)
Re: [bulrush] [perl] doesn't work [In reply to] Can't Post

Hey,

Not sure why, but the "perl" markup tags have never worked for me either, use "code" markup tags instead.

Chris


BillKSmith
Veteran

Jul 9, 2014, 10:16 AM

Post #3 of 6 (56521 views)
Re: [Zhris] [perl] doesn't work [In reply to] Can't Post

Perhaps someone could remove this tag from the Markup Help.


Zhris
Enthusiast

Jul 9, 2014, 5:37 PM

Post #4 of 6 (56248 views)
Re: [BillKSmith] [perl] doesn't work [In reply to] Can't Post

Agreed.

It would be kind of a cool feature though. I have been playing with Syntax::Highlight::Perl this evening, influenced by this post, but the highlighter no longer exists. Perhaps this is something that could be worked on and hosted someplace.


Code
#!/usr/bin/perl 
use strict;
use warnings;
use Syntax::Highlight::Perl;

#####

my $code = <<'CODE';
my $var = 1;
print $var;
CODE

my $colours =
{
Variable => 'red'
};

#####

my $formatter = Syntax::Highlight::Perl->new( );

while ( my ( $type, $colour ) = each ( %$colours ) )
{
$formatter->set_start_format( $type, "[$colour]" );
$formatter->set_end_format( $type, "[/$colour]" );
}

print $formatter->format_string( $code );


Output:


Code
my $var = 1 
print $var;


Could even go as far as for example, pulling out regular expressions and listing their YAPE::Regex::Explain plans underneath in separate code blocks, or tidying up code via Perl::Tidy etc...

Chris


(This post was edited by Zhris on Jul 9, 2014, 5:41 PM)


Laurent_R
Veteran / Moderator

Jul 11, 2014, 3:44 PM

Post #5 of 6 (54586 views)
Re: [Zhris] [perl] doesn't work [In reply to] Can't Post

To tell the truth, I do not think that the site owner/web master is willing to spend much time on it.

It took me quite a bit of effort to get FishMonger and myself appointed as moderators of the site to be at least able to remove spams and other spurious content (you might remember a period, six to twelve months ago, where the forum was overwelmed with spams). FishMonger and myself succeeded to ban most of this spam activity, but it is unlikely we can get very much further.


Zhris
Enthusiast

Jul 13, 2014, 4:04 PM

Post #6 of 6 (52621 views)
Re: [Laurent_R] [perl] doesn't work [In reply to] Can't Post

I do remember those dark times, I hadn't realized the effort you guys took to get the forum under as much control as possible.

I have been working on an external markup tool, which for the most part appears to work quite well and is temporarily available here. For now, its purely experimental, but I can envisage it being useful in the future.

Regards,

Chris

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives