#!/usr/bin/perl # Usage example: # ./links2elinks_bookmarks.pl < ~/.links2/bookmarks.html >> ~/.config/elinks/bookmarks use 5.036; while (<>) { state $d = 0; $d++ if m,^
$,; $d-- if m,^
$,; say "$1\t\t$d\tF" if m,

(.*)

,; say "$2\t$1\t$d\t" if m,
(.*),; }